summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-06-23 04:24:24 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-06-23 04:24:24 +0000
commit3be3d84b6aec64b9e7b50f8ccd52af1433793a4d (patch)
treed514c8dcea73a23d50860b126fc856acf6bbdacb
parentaf1c6bb05e63a28acff10183a1d58385aa6cd52d (diff)
downloadgtk+-3be3d84b6aec64b9e7b50f8ccd52af1433793a4d.tar.gz
Don't trigger warnings if there are extra references to the hbox.
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)
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.pre-2-104
-rw-r--r--ChangeLog.pre-2-84
-rw-r--r--gtk/gtkbutton.c6
4 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ef1363f07..352c4f6b25 100644
--- 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)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 5ef1363f07..352c4f6b25 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -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)
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 5ef1363f07..352c4f6b25 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -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)
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 3a9f2a451a..8190ad8fa2 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -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);