[gtk+/kill-size-request] Removed size_request from GtkToolItemGroup
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/kill-size-request] Removed size_request from GtkToolItemGroup
- Date: Thu, 28 Oct 2010 06:17:10 +0000 (UTC)
commit 152350946771bf647bb3e2e4b84edf0df2d0d067
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Thu Oct 28 15:16:06 2010 +0900
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.
gtk/gtktoolitemgroup.c | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index 0f11b29..9f238c6 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]