diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-06-11 03:21:10 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-06-11 03:47:13 +0800 |
commit | 4f7b4d81e757bfed1b42b888207a0fdf6fae8533 (patch) | |
tree | 5c159ca51db5488c7e8c8cf1ab55fd48953ecf3d /shell/e-shell-backend.c | |
parent | e51e1d6e4bbd6d33a841a87b15680c824adf8988 (diff) | |
download | gsoc2013-evolution-4f7b4d81e757bfed1b42b888207a0fdf6fae8533.tar.gz gsoc2013-evolution-4f7b4d81e757bfed1b42b888207a0fdf6fae8533.tar.zst gsoc2013-evolution-4f7b4d81e757bfed1b42b888207a0fdf6fae8533.zip |
Reimplement the main toolbar's "prefer-item" feature.
This fixes a bug in the old implementation where the application could
crash after a second shell window was created and destroyed, because a
signal handler with the destroyed shell window as the closure was left
connected.
But moreover this simplifies the implementation by using a property
binding plus transform function instead of juggling signal handlers,
and also adds code comments where things get a little tricky.
Removed (now unused) functions:
e_shell_window_get_toolbar_new_prefer_item
e_shell_window_set_toolbar_new_prefer_item
Diffstat (limited to 'shell/e-shell-backend.c')
-rw-r--r-- | shell/e-shell-backend.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c index 0261d8a3e2..d30e698981 100644 --- a/shell/e-shell-backend.c +++ b/shell/e-shell-backend.c @@ -252,11 +252,6 @@ shell_backend_dispose (GObject *object) priv->shell_view_class = NULL; } - if (priv->prefer_new_item) { - g_free (priv->prefer_new_item); - priv->prefer_new_item = NULL; - } - if (priv->notify_busy_handler_id > 0) { g_signal_handler_disconnect ( object, priv->notify_busy_handler_id); @@ -279,6 +274,7 @@ shell_backend_finalize (GObject *object) g_free (priv->config_dir); g_free (priv->data_dir); + g_free (priv->prefer_new_item); /* Chain up to parent's finalize() method. */ G_OBJECT_CLASS (e_shell_backend_parent_class)->finalize (object); |