application: Ignore --no-desktop if not first launch

--no-desktop is an option to allow for running Nautilus under other desktop
environments as well as GNOME without clobbering the foreign desktop
environment's desktop.

https://bugzilla.gnome.org/show_bug.cgi?id=750528

Signed-off-by: Chow Loong Jin <hyperair@debian.org>
This commit is contained in:
Chow Loong Jin 2015-06-08 04:55:50 +08:00 committed by Carlos Soriano
parent fed56bda01
commit bfe878e431

View file

@ -826,10 +826,14 @@ nautilus_application_command_line (GApplication *application,
g_action_group_activate_action (G_ACTION_GROUP (application),
"open-desktop", NULL);
} else if (g_variant_dict_contains (options, "no-desktop")) {
DEBUG ("Forcing desktop off, as requested");
self->priv->desktop_override = TRUE;
g_action_group_activate_action (G_ACTION_GROUP (application),
"close-desktop", NULL);
if (g_application_get_is_remote (application)) {
DEBUG ("Not primary instance. Ignoring --no-desktop.");
} else {
DEBUG ("Forcing desktop off, as requested");
self->priv->desktop_override = TRUE;
g_action_group_activate_action (G_ACTION_GROUP (application),
"close-desktop", NULL);
}
}
if (g_variant_dict_contains (options, "no-default-window")) {