diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-10-26 23:03:10 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-30 17:35:17 +0900 |
commit | d4a07d566180226649721a53c884d5d97708e755 (patch) | |
tree | 074879a38a963869ff65009c08e029546af17014 /gtk/gtklayout.c | |
parent | 381cd8b07ca9f0f0352b41acfca29cf43d549465 (diff) | |
download | gtk+-d4a07d566180226649721a53c884d5d97708e755.tar.gz |
Remove size_request from GtkLayout
Diffstat (limited to 'gtk/gtklayout.c')
-rw-r--r-- | gtk/gtklayout.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c index 266d6c8f94..fd04e689c4 100644 --- a/gtk/gtklayout.c +++ b/gtk/gtklayout.c @@ -80,7 +80,7 @@ struct _GtkLayoutChild { enum { PROP_0, PROP_HADJUSTMENT, - PROP_VADJUSTMENT, + PROP_VADJUSTMENT, PROP_HSCROLL_POLICY, PROP_VSCROLL_POLICY, PROP_WIDTH, @@ -105,8 +105,12 @@ static void gtk_layout_finalize (GObject *object); static void gtk_layout_realize (GtkWidget *widget); static void gtk_layout_unrealize (GtkWidget *widget); static void gtk_layout_map (GtkWidget *widget); -static void gtk_layout_size_request (GtkWidget *widget, - GtkRequisition *requisition); +static void gtk_layout_get_preferred_width (GtkWidget *widget, + gint *minimum, + gint *natural); +static void gtk_layout_get_preferred_height (GtkWidget *widget, + gint *minimum, + gint *natural); static void gtk_layout_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static gint gtk_layout_draw (GtkWidget *widget, @@ -651,7 +655,8 @@ gtk_layout_class_init (GtkLayoutClass *class) widget_class->realize = gtk_layout_realize; widget_class->unrealize = gtk_layout_unrealize; widget_class->map = gtk_layout_map; - widget_class->size_request = gtk_layout_size_request; + widget_class->get_preferred_width = gtk_layout_get_preferred_width; + widget_class->get_preferred_height = gtk_layout_get_preferred_height; widget_class->size_allocate = gtk_layout_size_allocate; widget_class->draw = gtk_layout_draw; widget_class->style_set = gtk_layout_style_set; @@ -932,15 +937,23 @@ gtk_layout_unrealize (GtkWidget *widget) GTK_WIDGET_CLASS (gtk_layout_parent_class)->unrealize (widget); } -static void -gtk_layout_size_request (GtkWidget *widget, - GtkRequisition *requisition) +static void +gtk_layout_get_preferred_width (GtkWidget *widget, + gint *minimum, + gint *natural) +{ + *minimum = *natural = 0; +} + +static void +gtk_layout_get_preferred_height (GtkWidget *widget, + gint *minimum, + gint *natural) { - requisition->width = 0; - requisition->height = 0; + *minimum = *natural = 0; } -static void +static void gtk_layout_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { |