diff --git a/ChangeLog b/ChangeLog index 4d9c8cb70c..524a6aad2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-04-14 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_relayout): Don't spit + out warnings if called before the combo box is + realized. (#139742, Philip Langdale) + Wed Apr 14 03:45:39 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4d9c8cb70c..524a6aad2f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-04-14 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_relayout): Don't spit + out warnings if called before the combo box is + realized. (#139742, Philip Langdale) + Wed Apr 14 03:45:39 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4d9c8cb70c..524a6aad2f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2004-04-14 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_relayout): Don't spit + out warnings if called before the combo box is + realized. (#139742, Philip Langdale) + Wed Apr 14 03:45:39 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4d9c8cb70c..524a6aad2f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-04-14 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_relayout): Don't spit + out warnings if called before the combo box is + realized. (#139742, Philip Langdale) + Wed Apr 14 03:45:39 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4d9c8cb70c..524a6aad2f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-04-14 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_relayout): Don't spit + out warnings if called before the combo box is + realized. (#139742, Philip Langdale) + Wed Apr 14 03:45:39 2004 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 79942ee42c..759d5a089e 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1872,22 +1872,20 @@ gtk_combo_box_relayout (GtkComboBox *combo_box) GList *list, *j; GtkWidget *menu; - /* do nothing unless we are in menu style */ - if (combo_box->priv->tree_view) - return; - menu = combo_box->priv->popup_widget; - + + /* do nothing unless we are in menu style and realized */ + if (combo_box->priv->tree_view || !GTK_IS_MENU_SHELL (menu)) + return; + /* get rid of all children */ - g_return_if_fail (GTK_IS_MENU_SHELL (menu)); - list = gtk_container_get_children (GTK_CONTAINER (menu)); - + for (j = g_list_last (list); j; j = j->prev) gtk_container_remove (GTK_CONTAINER (menu), j->data); - + g_list_free (list); - + /* and relayout */ gtk_combo_box_menu_fill (combo_box); }