[nautilus] application: Restore --new-window functionality
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] application: Restore --new-window functionality
- Date: Fri, 10 Oct 2014 09:41:02 +0000 (UTC)
commit 2780ce8790fc575ea58ba5c6897f727ec369cea0
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Thu Oct 9 17:38:44 2014 +0200
application: Restore --new-window functionality
In case of no further arguments, open home folder. Commit
4e192481 "application: minimal port to handle_local_options()"
removed this, presumably accidentally. It makes clicking the "Files"
from favorites do nothing if Nautilus is already running (and it
always is running in classic mode as it handles desktop).
https://bugzilla.gnome.org/show_bug.cgi?id=738280
src/nautilus-application.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 88ed0f5..d86dc39 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -844,15 +844,17 @@ nautilus_application_handle_file_args (NautilusApplication *self,
g_variant_dict_lookup (options, G_OPTION_REMAINING, "^a&s", &remaining);
- if (remaining == NULL) {
- return -1;
- }
-
/* Convert args to GFiles */
file_array = g_ptr_array_new_full (0, g_object_unref);
- for (idx = 0; remaining[idx] != NULL; idx++) {
- file = g_file_new_for_commandline_arg (remaining[idx]);
+ if (remaining) {
+ for (idx = 0; remaining[idx] != NULL; idx++) {
+ file = g_file_new_for_commandline_arg (remaining[idx]);
+ g_ptr_array_add (file_array, file);
+ }
+ } else if (!self->priv->no_default_window &&
+ !g_variant_dict_contains (options, "select")) {
+ file = g_file_new_for_path (g_get_home_dir ());
g_ptr_array_add (file_array, file);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]