GNOME Bugzilla – Bug 738430
New window opens even in --gapp-service mode
Last modified: 2014-10-15 14:12:05 UTC
A new file manager window opens every time Nautilus is DBus-activated (running as `/usr/bin/nautilus --gapplication-service`). This means that if any program starts Nautilus, I get _two_ file windows, one at the desired location, one at ~. This was likely broken by commit 2780ce8790fc ("application: Restore --new-window functionality"). nautilus 3.14.0-7-g2780ce8
Created attachment 288373 [details] [review] nautilus-application: Fix commit 2780ce8790fc575ea In commit 2780ce8790fc575ea we restored the --new-window option, but at the same time we were creating a new window for any glib option like gapplication-service. Instead of that, check for known application options, and if not found any, let gapplication manage them.
Review of attachment 288373 [details] [review]: ::: src/nautilus-application.c @@ +853,3 @@ g_ptr_array_add (file_array, file); } } else if (!self->priv->no_default_window && Why check for no_default_window here? If nautilus is spawned with "--no-default-window --new-window", I think it should still present a window. @@ +858,3 @@ g_ptr_array_add (file_array, file); + } else { + // No options or options that glib already manage No C++-style comments. Also manage -> manages
Created attachment 288387 [details] [review] nautilus-application: Fix commit 2780ce8790fc575ea In commit 2780ce8790fc575ea we restored the --new-window option, but at the same time we were creating a new window for any glib option like gapplication-service. Instead of that, check for known application options, and if not found any, let gapplication manage them.
(In reply to comment #2) > Review of attachment 288373 [details] [review]: > > ::: src/nautilus-application.c > @@ +853,3 @@ > g_ptr_array_add (file_array, file); > } > } else if (!self->priv->no_default_window && > um yeah, right. > Why check for no_default_window here? If nautilus is spawned with > "--no-default-window --new-window", I think it should still present a window. > > @@ +858,3 @@ > g_ptr_array_add (file_array, file); > + } else { > + // No options or options that glib already manage > > No C++-style comments. Also manage -> manages ups sorry, muscle memory
Created attachment 288388 [details] [review] nautilus-application: Fix commit 2780ce8790fc575ea In commit 2780ce8790fc575ea we restored the --new-window option, but at the same time we were creating a new window for any glib option like gapplication-service. Instead of that, check for known application options, and if not found any, let gapplication manage them.
Review of attachment 288388 [details] [review]: Looks good to me
Attachment 288388 [details] pushed as 0b5db3e - nautilus-application: Fix commit 2780ce8790fc575ea