aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-11-26 23:41:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-26 23:41:53 +0800
commitde85b6fbec63e6abb58097aa9f2ffc750ff94ed2 (patch)
tree28dd61345e3bdbd2ebcc2479b409bce1141623b5 /shell/e-shell.c
parentaa3152a2ec7b38232d71b32d085958e899cdc7c5 (diff)
downloadgsoc2013-evolution-de85b6fbec63e6abb58097aa9f2ffc750ff94ed2.tar.gz
gsoc2013-evolution-de85b6fbec63e6abb58097aa9f2ffc750ff94ed2.tar.zst
gsoc2013-evolution-de85b6fbec63e6abb58097aa9f2ffc750ff94ed2.zip
Handle a missed corner case with --quit.
If --quit is given and no other Evolution process is running, bypass our usual shutdown procedure and terminate the main loop immediately.
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index e03efb49cf..38a232ba1a 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -1645,6 +1645,11 @@ e_shell_quit (EShell *shell)
if (unique_app_is_running (app))
goto unique;
+ /* This handles the case where a --quit command-line option
+ * was given and no other Evolution process is running. */
+ if (e_shell_get_watched_windows (shell) == NULL)
+ goto bypass;
+
if (!shell_request_quit (shell))
return FALSE;
@@ -1652,6 +1657,12 @@ e_shell_quit (EShell *shell)
return TRUE;
+bypass: /* Bypass our usual shutdown procedure. */
+
+ gtk_main_quit ();
+
+ return TRUE;
+
unique: /* Send a message to the other Evolution process. */
response = unique_app_send_message (app, UNIQUE_CLOSE, NULL);