diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-06-13 02:28:07 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-06-13 02:28:07 +0800 |
commit | 51d0fc6863be998af5056605281cc0ebc2abfe00 (patch) | |
tree | ca9410d6729e2b3d989f0fbbc069c2563a634739 /shell/main.c | |
parent | 077116eac4cbfd5f06c44c8f5634469eab3130e6 (diff) | |
download | gsoc2013-evolution-51d0fc6863be998af5056605281cc0ebc2abfe00.tar.gz gsoc2013-evolution-51d0fc6863be998af5056605281cc0ebc2abfe00.tar.zst gsoc2013-evolution-51d0fc6863be998af5056605281cc0ebc2abfe00.zip |
Bug 603468 - Improve handling of --quit option
Diffstat (limited to 'shell/main.c')
-rw-r--r-- | shell/main.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/shell/main.c b/shell/main.c index cac04dd0bd..7e58d97aa6 100644 --- a/shell/main.c +++ b/shell/main.c @@ -232,9 +232,7 @@ idle_cb (gchar **uris) /* These calls do the right thing when another Evolution * process is running. */ - if (quit) - e_shell_quit (shell); - else if (uris != NULL && *uris != NULL) { + if (uris != NULL && *uris != NULL) { if (e_shell_handle_uris (shell, uris, import_uris) == 0) gtk_main_quit (); } else { @@ -578,6 +576,13 @@ main (gint argc, gchar **argv) shell = create_default_shell (); + if (quit) { + e_shell_quit (shell, E_SHELL_QUIT_OPTION); + goto exit; + } + + e_shell_load_modules (shell); + if (!disable_eplugin) { /* Register built-in plugin hook types. */ es_event_hook_get_type (); @@ -593,9 +598,9 @@ main (gint argc, gchar **argv) } if (requested_view) - e_shell_set_startup_view(shell, requested_view); + e_shell_set_startup_view (shell, requested_view); else if (express_mode) - e_shell_set_startup_view(shell, "mail"); + e_shell_set_startup_view (shell, "mail"); /* Attempt migration -after- loading all modules and plugins, * as both shell backends and certain plugins hook into this. */ @@ -608,6 +613,7 @@ main (gint argc, gchar **argv) gtk_main (); +exit: /* Drop what should be the last reference to the shell. * That will cause e_shell_get_default() to henceforth * return NULL. Use that to check for reference leaks. */ |