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 754743 - Middle click on "Other Locations" doesn't open a new tab
Middle click on "Other Locations" doesn't open a new tab
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.18.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
: 759258 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-09-08 21:05 UTC by Sebastian Keller
Modified: 2017-10-01 21:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkplacessidebar: add open flags to other locations (2.66 KB, patch)
2016-02-22 13:32 UTC, Carlos Soriano
needs-work Details | Review
window: use open flags for other locations view (1.36 KB, patch)
2016-02-22 13:32 UTC, Carlos Soriano
committed Details | Review
gtkplacessidebar: add open flags to other locations (3.26 KB, patch)
2016-02-22 13:47 UTC, Carlos Soriano
none Details | Review
gtkplacessidebar: add open flags to other locations (3.26 KB, patch)
2016-02-22 13:49 UTC, Carlos Soriano
none Details | Review
gtkplacessidebar: add open flags to other locations (4.10 KB, patch)
2016-02-22 16:00 UTC, Carlos Soriano
none Details | Review
Revert "gtkplacessidebar: add open flags to other locations" (3.88 KB, patch)
2016-02-29 22:23 UTC, Carlos Soriano
committed Details | Review
gtkplacessidebar: add open flags to other locations (7.61 KB, patch)
2016-02-29 22:23 UTC, Carlos Soriano
none Details | Review
gtkplacessidebar: add new other locations with flags signal (7.62 KB, patch)
2016-02-29 22:27 UTC, Carlos Soriano
committed Details | Review

Description Sebastian Keller 2015-09-08 21:05:05 UTC
A middle click on all sidebar entries opens a new tab except "Other Locations" which opens in the current tab.
Comment 1 antistress 2015-10-10 13:50:10 UTC
I can confirm this bug with Nautilus 3.18.0 on Debian Sid 64 bits
Comment 2 Christoph Reiter (lazka) 2015-10-15 19:08:51 UTC
The same happens when selecting "Open in new tab" or "Open in new window" in the context menu. In both cases the current view gets replaced instead of a new tab/window opened.
Comment 3 Carlos Soriano 2015-10-19 13:46:13 UTC
this is a faulty API from the GtkPlacesSidebar. Will need to pass the GTK_PLACES_OPEN flag on the signal as well...
Comment 4 Carlos Soriano 2016-02-22 13:32:12 UTC
Created attachment 321837 [details] [review]
gtkplacessidebar: add open flags to other locations

We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add the signal missing parameter in order to allow it.
Comment 5 Carlos Soriano 2016-02-22 13:32:29 UTC
Created attachment 321838 [details] [review]
window: use open flags for other locations view

We weren't checking the open flags from the sidebar when the other
locations was clicked.

This was due to the sidebar not adding those flags to the signal.

In a recent commit gtk+ added the missing flags, so now we can check for
those in nautilus and open in the current view, in a tab or in a window
accordingly.
Comment 6 Carlos Soriano 2016-02-22 13:47:07 UTC
Created attachment 321841 [details] [review]
gtkplacessidebar: add open flags to other locations

We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add the signal missing parameter in order to allow it.
Comment 7 Carlos Soriano 2016-02-22 13:49:41 UTC
Created attachment 321843 [details] [review]
gtkplacessidebar: add open flags to other locations

We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add the signal missing parameter in order to allow it.
Comment 8 Matthias Clasen 2016-02-22 13:54:51 UTC
Review of attachment 321837 [details] [review]:

What I am missing in this patch is documentation updates. There should be a note in the signal docs explaining the change ("Since 3.20,...")
and there should be a paragraph in the 3.20 section of README.in mentioning the API change as well.
Comment 9 Carlos Soriano 2016-02-22 16:00:03 UTC
Created attachment 321856 [details] [review]
gtkplacessidebar: add open flags to other locations

We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add the signal missing parameter in order to allow it.
Comment 10 Carlos Soriano 2016-02-22 16:00:45 UTC
Applied your comments Mathias. Hope the wording is fine.
Comment 11 Matthias Clasen 2016-02-24 01:31:31 UTC
Attachment 321856 [details] pushed as 63a204e - gtkplacessidebar: add open flags to other locations
Comment 12 Carlos Soriano 2016-02-24 10:24:15 UTC
Comment on attachment 321838 [details] [review]
window: use open flags for other locations view

Attachment 321838 [details] pushed as 5abce34 - window: use open flags for other locations view
Comment 13 Murray Cumming 2016-02-26 08:25:19 UTC
What value will this new parameter have now if the signal parameter, or the default signal handler (the vfunc), is called by apps that have been built against the older version of GTK+?
Comment 14 Matthias Clasen 2016-02-26 12:00:42 UTC
Depends on what the app passes as user data, I'd say. But really, the only reason I allowed this change is because no application other than nautilus is using this API. If an app is found that is broken by this, we'll have to reconsider.
Comment 15 Carlos Soriano 2016-02-26 15:44:35 UTC
*** Bug 759258 has been marked as a duplicate of this bug. ***
Comment 16 Carlos Soriano 2016-02-26 15:46:16 UTC
Mathias, I think the problem is that some distributions (afaik Ubuntu will for 16.04) use nautilus 3.14 with gtk+ 3.18, which makes this a problem.

I'm not sure what is a good solution for this.
Comment 17 Emmanuele Bassi (:ebassi) 2016-02-26 15:53:47 UTC
(In reply to Carlos Soriano from comment #16)
> Mathias, I think the problem is that some distributions (afaik Ubuntu will
> for 16.04) use nautilus 3.14 with gtk+ 3.18, which makes this a problem.

Since 3.18 does not have the ABI change, I think you mean "use Nautilus 3.14 with GTK+ 3.20"?

> I'm not sure what is a good solution for this.

What we do for all these issues: we add a new signal and deprecate the old one.
Comment 18 Emmanuele Bassi (:ebassi) 2016-02-26 15:58:34 UTC
Alternatively, you can use an "out of band" function that returns the open flags while inside the signal emission chain.
Comment 19 Carlos Soriano 2016-02-26 16:01:31 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #17)
> (In reply to Carlos Soriano from comment #16)
> > Mathias, I think the problem is that some distributions (afaik Ubuntu will
> > for 16.04) use nautilus 3.14 with gtk+ 3.18, which makes this a problem.
> 
> Since 3.18 does not have the ABI change, I think you mean "use Nautilus 3.14
> with GTK+ 3.20"?
> 
> > I'm not sure what is a good solution for this.
> 
> What we do for all these issues: we add a new signal and deprecate the old
> one.

Oh, I was not clear. We broke ABI as well in gtk+ 3.18 with the populate-popup signal.

I'm all to create a new signal for the one discussed in this bug report, show-other-locations.
Comment 20 Matthias Clasen 2016-02-26 16:21:01 UTC
(In reply to Carlos Soriano from comment #16)
> Mathias, I think the problem is that some distributions (afaik Ubuntu will
> for 16.04) use nautilus 3.14 with gtk+ 3.18, which makes this a problem.
> 
> I'm not sure what is a good solution for this.

They have the source, they know how to cherry pick or revert a patch
Comment 21 Kjell Ahlstedt 2016-02-28 16:09:31 UTC
> What we do for all these issues: we add a new signal and deprecate the old one.

Yes, please. Revert the change in GtkPlacesSidebar::show-other-locations,
deprecate it, and add a new signal with the required signature.
That would simplify for gtkmm, and probably for other language bindings.
Comment 22 Carlos Soriano 2016-02-29 22:23:48 UTC
Created attachment 322709 [details] [review]
Revert "gtkplacessidebar: add open flags to other locations"

This reverts commit 63a204e1c5b6c since it broke the API.
We will add a new signal instead in an upcomming patch.
Comment 23 Carlos Soriano 2016-02-29 22:23:54 UTC
Created attachment 322710 [details] [review]
gtkplacessidebar: add open flags to other locations

We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add a new signal with an open flags parameter and deprecate
the other-location signal.
Comment 24 Carlos Soriano 2016-02-29 22:27:23 UTC
Created attachment 322712 [details] [review]
gtkplacessidebar: add new other locations with flags signal

We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add a new signal with an open flags parameter and deprecate
the other-location signal.
Comment 25 Matthias Clasen 2016-03-01 17:23:36 UTC
Review of attachment 322709 [details] [review]:

ok
Comment 26 Matthias Clasen 2016-03-01 17:23:57 UTC
Review of attachment 322712 [details] [review]:

ok
Comment 27 Matthias Clasen 2016-03-01 17:24:29 UTC
please also remove the release note about this api break in README.in
Comment 28 Carlos Soriano 2016-03-02 08:56:20 UTC
(In reply to Matthias Clasen from comment #27)
> please also remove the release note about this api break in README.in

The first patch that reverts the original one removes this already. Am I missing something?
Comment 29 Matthias Clasen 2016-03-05 01:17:54 UTC
Attachment 322709 [details] pushed as fec0c4c - Revert "gtkplacessidebar: add open flags to other locations"
Attachment 322712 [details] pushed as fdde27e - gtkplacessidebar: add new other locations with flags signal
Comment 30 antistress 2017-10-01 21:22:09 UTC
On my Debian Sid with GNOME 3.26, middle clicking on a an item displayed within the "Other locations" window doesn't open a new tab 

$ dpkg -s nautilus | grep ^Version
Version: 3.26.0-1

Thanks