[gtk+/treeview-refactor] Remove size_request from GtkButtonBox
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/treeview-refactor] Remove size_request from GtkButtonBox
- Date: Sat, 30 Oct 2010 08:31:25 +0000 (UTC)
commit 2078db969cbff6be2ea731d2f74b1c3aff6c40e6
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 26 20:57:40 2010 -0400
Remove size_request from GtkButtonBox
gtk/gtkbbox.c | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index 92f88fe..346e9c5 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -81,8 +81,12 @@ static void gtk_button_box_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
-static void gtk_button_box_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
+static void gtk_button_box_get_preferred_width (GtkWidget *widget,
+ gint *minimum,
+ gint *natural);
+static void gtk_button_box_get_preferred_height (GtkWidget *widget,
+ gint *minimum,
+ gint *natural);
static void gtk_button_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_button_box_remove (GtkContainer *container,
@@ -120,7 +124,8 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
gobject_class->set_property = gtk_button_box_set_property;
gobject_class->get_property = gtk_button_box_get_property;
- widget_class->size_request = gtk_button_box_size_request;
+ widget_class->get_preferred_width = gtk_button_box_get_preferred_width;
+ widget_class->get_preferred_height = gtk_button_box_get_preferred_height;
widget_class->size_allocate = gtk_button_box_size_allocate;
container_class->remove = gtk_button_box_remove;
@@ -613,6 +618,30 @@ gtk_button_box_size_request (GtkWidget *widget,
}
static void
+gtk_button_box_get_preferred_width (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
+{
+ GtkRequisition requisition;
+
+ gtk_button_box_size_request (widget, &requisition);
+
+ *minimum = *natural = requisition.width;
+}
+
+static void
+gtk_button_box_get_preferred_height (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
+{
+ GtkRequisition requisition;
+
+ gtk_button_box_size_request (widget, &requisition);
+
+ *minimum = *natural = requisition.height;
+}
+
+static void
gtk_button_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]