Commit b2397d3d authored by Matthias Clasen's avatar Matthias Clasen

Don't set get_preferred_width_for_height to NULL

The size request machinery expects that it is non-NULL.
parent ac3fe174
...@@ -81,12 +81,21 @@ static void gtk_button_box_get_property (GObject *object, ...@@ -81,12 +81,21 @@ static void gtk_button_box_get_property (GObject *object,
guint prop_id, guint prop_id,
GValue *value, GValue *value,
GParamSpec *pspec); GParamSpec *pspec);
static void gtk_button_box_get_preferred_width (GtkWidget *widget, static void gtk_button_box_get_preferred_width (GtkWidget *widget,
gint *minimum, gint *minimum,
gint *natural); gint *natural);
static void gtk_button_box_get_preferred_height (GtkWidget *widget, static void gtk_button_box_get_preferred_height (GtkWidget *widget,
gint *minimum, gint *minimum,
gint *natural); 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, static void gtk_button_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation); GtkAllocation *allocation);
static void gtk_button_box_remove (GtkContainer *container, static void gtk_button_box_remove (GtkContainer *container,
...@@ -126,8 +135,8 @@ gtk_button_box_class_init (GtkButtonBoxClass *class) ...@@ -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_width = gtk_button_box_get_preferred_width;
widget_class->get_preferred_height = gtk_button_box_get_preferred_height; widget_class->get_preferred_height = gtk_button_box_get_preferred_height;
widget_class->get_preferred_width_for_height = NULL; widget_class->get_preferred_width_for_height = gtk_button_box_get_preferred_width_for_height;
widget_class->get_preferred_height_for_width = NULL; widget_class->get_preferred_height_for_width = gtk_button_box_get_preferred_height_for_width;
widget_class->size_allocate = gtk_button_box_size_allocate; widget_class->size_allocate = gtk_button_box_size_allocate;
container_class->remove = gtk_button_box_remove; container_class->remove = gtk_button_box_remove;
...@@ -643,6 +652,24 @@ gtk_button_box_get_preferred_height (GtkWidget *widget, ...@@ -643,6 +652,24 @@ gtk_button_box_get_preferred_height (GtkWidget *widget,
*minimum = *natural = requisition.height; *minimum = *natural = requisition.height;
} }
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 static void
gtk_button_box_size_allocate (GtkWidget *widget, gtk_button_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation) GtkAllocation *allocation)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment