mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
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
This commit is contained in:
parent
bc90a2b916
commit
adf36e28d2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user