Commit 2e88ae8a authored by Matthias Clasen's avatar Matthias Clasen

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.
parent 250eb1e8
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment