forked from AuroraMiddleware/gtk
GtkStackSwitcher: Disconnect signals when a child is removed
This is quite an oversight, and causes bad things to happen if the child is later changed. https://bugzilla.gnome.org/show_bug.cgi?id=736307
This commit is contained in:
parent
250eb1e889
commit
2e88ae8ad9
@ -330,6 +330,11 @@ on_stack_child_removed (GtkContainer *container,
|
||||
GtkStackSwitcherPrivate *priv;
|
||||
|
||||
priv = gtk_stack_switcher_get_instance_private (self);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (widget, on_title_icon_visible_updated, self);
|
||||
g_signal_handlers_disconnect_by_func (widget, on_position_updated, self);
|
||||
g_signal_handlers_disconnect_by_func (widget, on_needs_attention_updated, self);
|
||||
|
||||
button = g_hash_table_lookup (priv->buttons, widget);
|
||||
gtk_container_remove (GTK_CONTAINER (self), button);
|
||||
g_hash_table_remove (priv->buttons, widget);
|
||||
|
Loading…
Reference in New Issue
Block a user