[gtk+] Don't set get_preferred_width_for_height to NULL
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Don't set get_preferred_width_for_height to NULL
- Date: Fri, 29 Oct 2010 16:59:40 +0000 (UTC)
commit b2397d3d7e1babada20ca2e6d10640e3eb20a7e7
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 29 12:58:24 2010 -0400
Don't set get_preferred_width_for_height to NULL
The size request machinery expects that it is non-NULL.
gtk/gtkbbox.c | 43 +++++++++++++++++++++++++++++++++++--------
1 files changed, 35 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index f1531b1..045a3a2 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -81,12 +81,21 @@ static void gtk_button_box_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
-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_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_get_preferred_width_for_height (GtkWidget *widget,
+ gint height,
+ gint *minimum,
+ gint *natural);
+static void gtk_button_box_get_preferred_height_for_width (GtkWidget *widget,
+ gint width,
+ gint *minimum,
+ gint *natural);
+
static void gtk_button_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_button_box_remove (GtkContainer *container,
@@ -126,8 +135,8 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
widget_class->get_preferred_width = gtk_button_box_get_preferred_width;
widget_class->get_preferred_height = gtk_button_box_get_preferred_height;
- widget_class->get_preferred_width_for_height = NULL;
- widget_class->get_preferred_height_for_width = NULL;
+ widget_class->get_preferred_width_for_height = gtk_button_box_get_preferred_width_for_height;
+ widget_class->get_preferred_height_for_width = gtk_button_box_get_preferred_height_for_width;
widget_class->size_allocate = gtk_button_box_size_allocate;
container_class->remove = gtk_button_box_remove;
@@ -644,6 +653,24 @@ gtk_button_box_get_preferred_height (GtkWidget *widget,
}
static void
+gtk_button_box_get_preferred_width_for_height (GtkWidget *widget,
+ gint height,
+ gint *minimum,
+ gint *natural)
+{
+ gtk_button_box_get_preferred_width (widget, minimum, natural);
+}
+
+static void
+gtk_button_box_get_preferred_height_for_width (GtkWidget *widget,
+ gint width,
+ gint *minimum,
+ gint *natural)
+{
+ gtk_button_box_get_preferred_height (widget, minimum, natural);
+}
+
+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]