From 3e72ccbcdc75422010100354ac3d226746195626 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Fri, 7 Nov 2008 16:25:26 +0000 Subject: [PATCH] Check for child->parent instead of GTK_WIDGET_TOPLEVEL. 2008-11-07 Johan Dahlin * gtk/gtkcontainer.c (gtk_container_buildable_add_child): Check for child->parent instead of GTK_WIDGET_TOPLEVEL. svn path=/trunk/; revision=21771 --- ChangeLog | 5 +++++ gtk/gtkcontainer.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 783a920111..3a63380428 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-07 Johan Dahlin + + * gtk/gtkcontainer.c (gtk_container_buildable_add_child): + Check for child->parent instead of GTK_WIDGET_TOPLEVEL. + 2008-11-07 Michael Natterer * gtk/gtkscrollbar.c: remove bogus newlines in the middle of diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 30eb06ff2b..516773af01 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -311,7 +311,7 @@ gtk_container_buildable_add_child (GtkBuildable *buildable, { GTK_BUILDER_WARN_INVALID_CHILD_TYPE (buildable, type); } - else if (GTK_IS_WIDGET (child) && GTK_WIDGET_TOPLEVEL (child) == FALSE) + else if (GTK_IS_WIDGET (child) && GTK_WIDGET (child)->parent == NULL) { gtk_container_add (GTK_CONTAINER (buildable), GTK_WIDGET (child)); }