Check for child->parent instead of GTK_WIDGET_TOPLEVEL.

2008-11-07  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkcontainer.c (gtk_container_buildable_add_child):
    Check for child->parent instead of GTK_WIDGET_TOPLEVEL.


svn path=/trunk/; revision=21771
This commit is contained in:
Johan Dahlin 2008-11-07 16:25:26 +00:00 committed by Johan Dahlin
parent 4714ce9aa6
commit 3e72ccbcdc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-11-07 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtkcontainer.c (gtk_container_buildable_add_child):
Check for child->parent instead of GTK_WIDGET_TOPLEVEL.
2008-11-07 Michael Natterer <mitch@imendio.com>
* gtk/gtkscrollbar.c: remove bogus newlines in the middle of

View File

@ -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));
}