diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-28 15:16:06 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-10-28 15:16:06 +0900 |
commit | 152350946771bf647bb3e2e4b84edf0df2d0d067 (patch) | |
tree | d19b01762e0e0ca973d53d02e6f0d5fe19a4e2b8 /gtk/gtktoolitemgroup.c | |
parent | 6e22c646c6dcd4349c183e4b76efd7ab785bff22 (diff) | |
download | gtk+-152350946771bf647bb3e2e4b84edf0df2d0d067.tar.gz |
Removed size_request from GtkToolItemGroup
Ofcourse GtkToolPalette needs real migration to height-for-width
apis, this patch just removes the need for the size_request
signal and vfunc.
Diffstat (limited to 'gtk/gtktoolitemgroup.c')
-rw-r--r-- | gtk/gtktoolitemgroup.c | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c index 0f11b29423..9f238c6cb0 100644 --- a/gtk/gtktoolitemgroup.c +++ b/gtk/gtktoolitemgroup.c @@ -568,6 +568,31 @@ gtk_tool_item_group_size_request (GtkWidget *widget, requisition->height += border_width * 2; } +static void +gtk_tool_item_group_get_preferred_width (GtkWidget *widget, + gint *minimum, + gint *natural) +{ + GtkRequisition requisition; + + gtk_tool_item_group_size_request (widget, &requisition); + + *minimum = *natural = requisition.width; +} + +static void +gtk_tool_item_group_get_preferred_height (GtkWidget *widget, + gint *minimum, + gint *natural) +{ + GtkRequisition requisition; + + gtk_tool_item_group_size_request (widget, &requisition); + + *minimum = *natural = requisition.height; +} + + static gboolean gtk_tool_item_group_is_item_visible (GtkToolItemGroup *group, GtkToolItemGroupChild *child) @@ -1542,12 +1567,13 @@ gtk_tool_item_group_class_init (GtkToolItemGroupClass *cls) oclass->finalize = gtk_tool_item_group_finalize; oclass->dispose = gtk_tool_item_group_dispose; - wclass->size_request = gtk_tool_item_group_size_request; - wclass->size_allocate = gtk_tool_item_group_size_allocate; - wclass->realize = gtk_tool_item_group_realize; - wclass->unrealize = gtk_tool_item_group_unrealize; - wclass->style_set = gtk_tool_item_group_style_set; - wclass->screen_changed = gtk_tool_item_group_screen_changed; + wclass->get_preferred_width = gtk_tool_item_group_get_preferred_width; + wclass->get_preferred_height = gtk_tool_item_group_get_preferred_height; + wclass->size_allocate = gtk_tool_item_group_size_allocate; + wclass->realize = gtk_tool_item_group_realize; + wclass->unrealize = gtk_tool_item_group_unrealize; + wclass->style_set = gtk_tool_item_group_style_set; + wclass->screen_changed = gtk_tool_item_group_screen_changed; cclass->add = gtk_tool_item_group_add; cclass->remove = gtk_tool_item_group_remove; |