From 7b428f021536163a2b055791c2a6d19250d5dc9b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 15 Jan 2006 04:09:50 +0000 Subject: Fix a crash with combo boxes in RESIZE_IMMEDIATE containers. (#326806, 2006-01-14 Matthias Clasen Fix a crash with combo boxes in RESIZE_IMMEDIATE containers. (#326806, Sebastian Bacher) * gtk/gtkcombobox.c (gtk_combo_box_size_allocate) (gtk_combo_box_size_request): Don't call gtk_combo_box_check_appearance() from here, as that can lead to recursion. (gtk_combo_box_init): Instead, call it here. --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ gtk/gtkcombobox.c | 8 +++----- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6506f6eca..4867cb0dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-01-14 Matthias Clasen + + Fix a crash with combo boxes in RESIZE_IMMEDIATE + containers. (#326806, Sebastian Bacher) + + * gtk/gtkcombobox.c (gtk_combo_box_size_allocate) + (gtk_combo_box_size_request): Don't call + gtk_combo_box_check_appearance() from here, as that + can lead to recursion. + (gtk_combo_box_init): Instead, call it here. + 2006-01-13 Matthias Clasen * */abicheck.sh: Make this work on more platforms. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6506f6eca..4867cb0dd 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2006-01-14 Matthias Clasen + + Fix a crash with combo boxes in RESIZE_IMMEDIATE + containers. (#326806, Sebastian Bacher) + + * gtk/gtkcombobox.c (gtk_combo_box_size_allocate) + (gtk_combo_box_size_request): Don't call + gtk_combo_box_check_appearance() from here, as that + can lead to recursion. + (gtk_combo_box_init): Instead, call it here. + 2006-01-13 Matthias Clasen * */abicheck.sh: Make this work on more platforms. diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index c2cd4081e..52383f513 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -736,6 +736,8 @@ gtk_combo_box_init (GtkComboBox *combo_box) combo_box->priv->editing_canceled = FALSE; combo_box->priv->auto_scroll = FALSE; combo_box->priv->focus_on_click = TRUE; + + gtk_combo_box_check_appearance (combo_box); } static void @@ -1777,9 +1779,7 @@ gtk_combo_box_size_request (GtkWidget *widget, GtkRequisition bin_req; GtkComboBox *combo_box = GTK_COMBO_BOX (widget); - - gtk_combo_box_check_appearance (combo_box); - + /* common */ gtk_widget_size_request (GTK_BIN (widget)->child, &bin_req); gtk_combo_box_remeasure (combo_box); @@ -1872,8 +1872,6 @@ gtk_combo_box_size_allocate (GtkWidget *widget, GtkRequisition req; gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; - gtk_combo_box_check_appearance (combo_box); - widget->allocation = *allocation; gtk_widget_style_get (GTK_WIDGET (widget), -- cgit v1.2.1