After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738430 - New window opens even in --gapp-service mode
New window opens even in --gapp-service mode
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-13 07:00 UTC by Mantas Mikulėnas (grawity)
Modified: 2014-10-15 14:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nautilus-application: Fix commit 2780ce8790fc575ea (1.28 KB, patch)
2014-10-13 09:15 UTC, Carlos Soriano
reviewed Details | Review
nautilus-application: Fix commit 2780ce8790fc575ea (1.35 KB, patch)
2014-10-13 13:53 UTC, Carlos Soriano
none Details | Review
nautilus-application: Fix commit 2780ce8790fc575ea (1.35 KB, patch)
2014-10-13 13:55 UTC, Carlos Soriano
committed Details | Review

Description Mantas Mikulėnas (grawity) 2014-10-13 07:00:23 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
Comment 1 Carlos Soriano 2014-10-13 09:15:42 UTC
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.
Comment 2 Cosimo Cecchi 2014-10-13 12:51:44 UTC
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
Comment 3 Carlos Soriano 2014-10-13 13:53:33 UTC
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.
Comment 4 Carlos Soriano 2014-10-13 13:54:53 UTC
(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
Comment 5 Carlos Soriano 2014-10-13 13:55:43 UTC
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.
Comment 6 Cosimo Cecchi 2014-10-13 23:08:17 UTC
Review of attachment 288388 [details] [review]:

Looks good to me
Comment 7 Carlos Soriano 2014-10-15 14:12:00 UTC
Attachment 288388 [details] pushed as 0b5db3e - nautilus-application: Fix commit 2780ce8790fc575ea