diff options
author | Michael Meeks <michael.meeks@novell.com> | 2010-03-14 06:08:42 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-03-14 06:08:42 +0800 |
commit | d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c (patch) | |
tree | 0a345052027eb8215674b8a052c50a2500b10625 | |
parent | f767cb847bebc3b9935137076d7e43f44f029029 (diff) | |
download | gsoc2013-evolution-d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c.tar gsoc2013-evolution-d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c.tar.gz gsoc2013-evolution-d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c.tar.bz2 gsoc2013-evolution-d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c.tar.lz gsoc2013-evolution-d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c.tar.xz gsoc2013-evolution-d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c.tar.zst gsoc2013-evolution-d1c8dd596ce7b0f6a4ce9de605fd67290b5ce42c.zip |
cleanup taskbar activities to remove signals with dangling pointers
-rw-r--r-- | shell/e-shell-taskbar.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c index 53ccae67c8..7e8a34ac7c 100644 --- a/shell/e-shell-taskbar.c +++ b/shell/e-shell-taskbar.c @@ -157,6 +157,17 @@ shell_taskbar_get_property (GObject *object, G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } +static gboolean +disconnect_remove (EActivity *activity, + EActivityProxy *proxy, + EShellTaskbar *shell_taskbar) +{ + g_signal_handlers_disconnect_matched + (activity, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, shell_taskbar); + return TRUE; +} + static void shell_taskbar_dispose (GObject *object) { @@ -188,7 +199,9 @@ shell_taskbar_dispose (GObject *object) priv->hbox = NULL; } - g_hash_table_remove_all (priv->proxy_table); + g_hash_table_foreach_remove (priv->proxy_table, + (GHRFunc) disconnect_remove, + object); /* Chain up to parent's dispose() method. */ G_OBJECT_CLASS (parent_class)->dispose (object); |