aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 6353a45f55..3799a2b513 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -953,8 +953,17 @@ view_delete_event_cb (GtkWidget *widget,
shell = E_SHELL (data);
e_shell_save_settings (shell);
- /* Destroy it */
- return FALSE;
+ if (g_list_length (shell->priv->views) != 1) {
+ /* If it's not the last view, just destroy it. */
+ return FALSE;
+ }
+
+ /* If it's the last view, ask for confirm before actually destroying
+ this view. */
+ if (e_shell_prepare_for_quit (shell))
+ return FALSE;
+ else
+ return TRUE;
}
static void