diff options
author | Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com> | 2012-02-16 01:36:06 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-03-18 15:41:07 -0400 |
commit | adf36e28d2723cfad5a4f50fc5ab50f5d6ff3f4f (patch) | |
tree | 0a311ab2acc581059c5c4512bbe9d77d00d0ca2e /gtk/gtkbox.c | |
parent | bc90a2b916c9914a01fedb08c945967648d8dc1c (diff) | |
download | gtk+-adf36e28d2723cfad5a4f50fc5ab50f5d6ff3f4f.tar.gz |
gtkbox: avoid warning when removing a widget with refcount of 1
If gtkbox is the only object having a reference on one of its child
and that we try to remove it from its container, we endup having a
warning when disconnecting a signal after having unparented the
widget.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=670176
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r-- | gtk/gtkbox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 7d85ba0eea..1705645a53 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -1807,13 +1807,13 @@ gtk_box_remove (GtkContainer *container, { gboolean was_visible; - was_visible = gtk_widget_get_visible (widget); - gtk_widget_unparent (widget); - g_signal_handlers_disconnect_by_func (widget, box_child_visibility_notify_cb, box); + was_visible = gtk_widget_get_visible (widget); + gtk_widget_unparent (widget); + priv->children = g_list_remove_link (priv->children, children); g_list_free (children); g_free (child); |