diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-09-09 14:48:59 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-09-09 14:48:59 -0400 |
commit | 2e88ae8ad99a07e5adf1264dead14f71d978b461 (patch) | |
tree | bcb568ebcc8a8cb27ed351683f6aaec4f8943e6c /gtk/gtkstackswitcher.c | |
parent | 250eb1e889eb568286cf3fbe5374aa736127b4a5 (diff) | |
download | gtk+-2e88ae8ad99a07e5adf1264dead14f71d978b461.tar.gz |
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
Diffstat (limited to 'gtk/gtkstackswitcher.c')
-rw-r--r-- | gtk/gtkstackswitcher.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c index 35d82b8be2..44fc7c8191 100644 --- a/gtk/gtkstackswitcher.c +++ b/gtk/gtkstackswitcher.c @@ -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); |