From: John Darrington Date: Tue, 25 Nov 2008 01:51:38 +0000 (+0900) Subject: Set the minimum-extent property from the size_allocate handler of the sheet X-Git-Tag: v0.7.1~114 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4179d3233e97505ed3def53dc02b6a778057d439;p=pspp-builds.git Set the minimum-extent property from the size_allocate handler of the sheet --- diff --git a/lib/gtksheet/gtksheet.c b/lib/gtksheet/gtksheet.c index 8b25902c..d8517ae3 100644 --- a/lib/gtksheet/gtksheet.c +++ b/lib/gtksheet/gtksheet.c @@ -4432,6 +4432,23 @@ gtk_sheet_size_allocate (GtkWidget *widget, sheet->row_title_area.height); + + + + + if (sheet->haxis) + { + gint width = sheet->column_title_area.width; + + if ( sheet->row_titles_visible) + width -= sheet->row_title_area.width; + + g_object_set (sheet->haxis, + "minimum-extent", width, + NULL); + } + + /* set the scrollbars adjustments */ adjust_scrollbars (sheet); } diff --git a/lib/gtksheet/psppire-axis.c b/lib/gtksheet/psppire-axis.c index 7b154908..a46bb483 100644 --- a/lib/gtksheet/psppire-axis.c +++ b/lib/gtksheet/psppire-axis.c @@ -129,10 +129,12 @@ psppire_axis_class_init (PsppireAxisClass *class) object_class->get_property = psppire_axis_get_property; min_extent_spec = - g_param_spec_pointer ("minimum-extent", - "Minimum Extent", - "The smallest extent to which the axis will provide units (typically set to the height/width of the associated widget)", - G_PARAM_WRITABLE | G_PARAM_READABLE ); + g_param_spec_long ("minimum-extent", + "Minimum Extent", + "The smallest extent to which the axis will provide units (typically set to the height/width of the associated widget)", + 0, G_MAXLONG, + 800, + G_PARAM_WRITABLE | G_PARAM_READABLE ); g_object_class_install_property (object_class, PROP_MIN_EXTENT,