From 4f7b4d81e757bfed1b42b888207a0fdf6fae8533 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 10 Jun 2013 15:21:10 -0400 Subject: 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 --- shell/e-shell-backend.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'shell/e-shell-backend.c') 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); -- cgit v1.2.3