From de85b6fbec63e6abb58097aa9f2ffc750ff94ed2 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 26 Nov 2009 10:41:53 -0500 Subject: 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. --- shell/e-shell.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'shell') 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); -- cgit v1.2.3