]> Pileus Git - ~andy/gtk/commitdiff
Don't spit out warnings if called before the combo box is realized.
authorMatthias Clasen <mclasen@redhat.com>
Wed, 14 Apr 2004 13:53:57 +0000 (13:53 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 14 Apr 2004 13:53:57 +0000 (13:53 +0000)
2004-04-14  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkcombobox.c (gtk_combo_box_relayout): Don't spit
out warnings if called before the combo box is
realized.  (#139742, Philip Langdale)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c

index 4d9c8cb70cc284741c4cb8d387281214730dca22..524a6aad2f65b39dc6a917894ad79b0d1c8773a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-14  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <jrb@gnome.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose
index 4d9c8cb70cc284741c4cb8d387281214730dca22..524a6aad2f65b39dc6a917894ad79b0d1c8773a4 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-14  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <jrb@gnome.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose
index 4d9c8cb70cc284741c4cb8d387281214730dca22..524a6aad2f65b39dc6a917894ad79b0d1c8773a4 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-14  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <jrb@gnome.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose
index 4d9c8cb70cc284741c4cb8d387281214730dca22..524a6aad2f65b39dc6a917894ad79b0d1c8773a4 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-14  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <jrb@gnome.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose
index 4d9c8cb70cc284741c4cb8d387281214730dca22..524a6aad2f65b39dc6a917894ad79b0d1c8773a4 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-14  Matthias Clasen  <mclasen@redhat.com>
+
+       * 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  <jrb@gnome.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_expose): propagate expose
index 79942ee42c0f415e12452bcfb3941534aa0674d5..759d5a089e94cf853e115f8f30fc4b77e7e24ea3 100644 (file)
@@ -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);
 }