]> Pileus Git - ~andy/gtk/commitdiff
Don't trigger warnings if there are extra references to the hbox.
authorMatthias Clasen <mclasen@redhat.com>
Thu, 23 Jun 2005 04:24:24 +0000 (04:24 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 23 Jun 2005 04:24:24 +0000 (04:24 +0000)
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkbutton.c (gtk_button_construct_child): Don't
trigger warnings if there are extra references to the
hbox.  (#308677, Dan Winship)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkbutton.c

index 5ef1363f072dff7150348388ab4716cc95ba353a..352c4f6b25a6ede9ea0c2f8fb50bcd64e20ad65f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-06-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkbutton.c (gtk_button_construct_child): Don't
+       trigger warnings if there are extra references to the
+       hbox.  (#308677, Dan Winship)
+
        * gtk/gtkfilesystemunix.c (bookmark_list_write): Use
        g_file_set_contents().  (#308722, Morten Welinder)
 
index 5ef1363f072dff7150348388ab4716cc95ba353a..352c4f6b25a6ede9ea0c2f8fb50bcd64e20ad65f 100644 (file)
@@ -1,5 +1,9 @@
 2005-06-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkbutton.c (gtk_button_construct_child): Don't
+       trigger warnings if there are extra references to the
+       hbox.  (#308677, Dan Winship)
+
        * gtk/gtkfilesystemunix.c (bookmark_list_write): Use
        g_file_set_contents().  (#308722, Morten Welinder)
 
index 5ef1363f072dff7150348388ab4716cc95ba353a..352c4f6b25a6ede9ea0c2f8fb50bcd64e20ad65f 100644 (file)
@@ -1,5 +1,9 @@
 2005-06-23  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkbutton.c (gtk_button_construct_child): Don't
+       trigger warnings if there are extra references to the
+       hbox.  (#308677, Dan Winship)
+
        * gtk/gtkfilesystemunix.c (bookmark_list_write): Use
        g_file_set_contents().  (#308722, Morten Welinder)
 
index 3a9f2a451a71c8ae61c2456550e87c3849f42ab9..8190ad8fa2b8cb7459c79373b5df71631dedc01b 100644 (file)
@@ -687,7 +687,11 @@ gtk_button_construct_child (GtkButton *button)
   if (GTK_BIN (button)->child)
     {
       if (priv->image && !priv->image_is_stock)
-       image = g_object_ref (priv->image);
+       {
+         image = g_object_ref (priv->image);
+         if (image->parent)
+           gtk_container_remove (GTK_CONTAINER (image->parent), image);
+       }
 
       gtk_container_remove (GTK_CONTAINER (button),
                            GTK_BIN (button)->child);