aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-08 02:23:46 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-08 02:23:46 +0800
commit8d8e4ac1c23905892a42b779188c852fdead7f5f (patch)
tree01609ceef7151d75f81fdc8762ac6c25215e8a51 /shell/e-shell-window-private.c
parent13a0edc3d27cce65a0f720e98516f7ab902ad0fc (diff)
downloadgsoc2013-evolution-8d8e4ac1c23905892a42b779188c852fdead7f5f.tar.gz
gsoc2013-evolution-8d8e4ac1c23905892a42b779188c852fdead7f5f.tar.zst
gsoc2013-evolution-8d8e4ac1c23905892a42b779188c852fdead7f5f.zip
Tweak the EShell API.
Disable File -> Close Window when there's only one window. Replace EMMessageBrowser with EMailBrowser. svn path=/branches/kill-bonobo/; revision=37009
Diffstat (limited to 'shell/e-shell-window-private.c')
-rw-r--r--shell/e-shell-window-private.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index a1027e437c..6fcdc2b6fc 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -173,6 +173,7 @@ e_shell_window_private_init (EShellWindow *shell_window)
{
EShellWindowPrivate *priv = shell_window->priv;
GHashTable *loaded_views;
+ GArray *signal_handler_ids;
GtkAccelGroup *accel_group;
GtkToolItem *item;
GtkWidget *container;
@@ -185,6 +186,8 @@ e_shell_window_private_init (EShellWindow *shell_window)
(GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
+ signal_handler_ids = g_array_new (FALSE, FALSE, sizeof (gulong));
+
priv->ui_manager = gtk_ui_manager_new ();
priv->shell_actions = gtk_action_group_new ("shell");
priv->gal_view_actions = gtk_action_group_new ("gal-view");
@@ -194,6 +197,7 @@ e_shell_window_private_init (EShellWindow *shell_window)
priv->switcher_actions = gtk_action_group_new ("switcher");
priv->loaded_views = loaded_views;
priv->active_view = "unknown";
+ priv->signal_handler_ids = signal_handler_ids;
merge_id = gtk_ui_manager_new_merge_id (priv->ui_manager);
priv->custom_rule_merge_id = merge_id;
@@ -369,6 +373,21 @@ e_shell_window_private_dispose (EShellWindow *shell_window)
{
EShellWindowPrivate *priv = shell_window->priv;
+ /* Need to disconnect handlers before we unref the shell. */
+ if (priv->signal_handler_ids != NULL) {
+ GArray *array = priv->signal_handler_ids;
+ gulong handler_id;
+ guint ii;
+
+ for (ii = 0; ii < array->len; ii++) {
+ handler_id = g_array_index (array, gulong, ii);
+ g_signal_handler_disconnect (priv->shell, handler_id);
+ }
+
+ g_array_free (array, TRUE);
+ priv->signal_handler_ids = NULL;
+ }
+
DISPOSE (priv->shell);
DISPOSE (priv->ui_manager);