summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <carlos.sorian89@gmail.com>2014-12-05 17:57:19 +0100
committerCarlos Soriano <carlos.sorian89@gmail.com>2014-12-05 20:08:35 +0100
commit7f1ecc5f102380d616439ce83d815060487e96c0 (patch)
treee90708f4ad34eaf5cbddbf03c1d9911ff953002b
parent0f1909ae348ca428dc116fcfb1993eac6443d1ff (diff)
downloadnautilus-7f1ecc5f102380d616439ce83d815060487e96c0.tar.gz
nautilus-application: Parse force-desktop before exiting
In commit ae4d4960 we introduced a regression that a new window was openned if both --no-default-window and --force-desktop options were used. To avoid that, activate those options before actually skipping the activate of the application if --no-default-window option is provided. The application nornally would exit if --no-default-window is provided and the show-desktop-window is not activated, but, we rely on a the detail that activating the open-desktop action when --force-desktop is provided as a option, creates a new window, which makes the application keep alive. https://bugzilla.gnome.org/show_bug.cgi?id=741166
-rw-r--r--src/nautilus-application.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index ead31bf37..a768e521a 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -876,7 +876,9 @@ nautilus_application_handle_local_options (GApplication *application,
self->priv->desktop_override = TRUE;
g_action_group_activate_action (G_ACTION_GROUP (application),
"close-desktop", NULL);
- } else if (g_variant_dict_contains (options, "no-default-window")) {
+ }
+
+ if (g_variant_dict_contains (options, "no-default-window")) {
/* We want to avoid trigering the activate signal; so no window is created.
* GApplication doesn't call activate if we return a value >= 0.
* Use EXIT_SUCCESS since is >= 0. */