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 355760 - Side pane items shouldn't require a double click to open the location
Side pane items shouldn't require a double click to open the location
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Sidebar
2.22.x
Other All
: Normal minor
: 2.24.x
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 491899 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-13 11:34 UTC by Anton Gavrilov
Modified: 2008-04-27 19:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Fix for nautilus 2.16.3 (1.26 KB, patch)
2007-01-09 23:18 UTC, Josselin Mouette
none Details | Review
places-sidebar_single-click.patch (1.06 KB, patch)
2008-03-19 12:46 UTC, Sebastian Dröge (slomo)
needs-work Details | Review
patch (1.88 KB, patch)
2008-03-19 18:34 UTC, Cosimo Cecchi
committed Details | Review

Description Anton Gavrilov 2006-09-13 11:34:42 UTC
Currently, single-clicking an item just selects it and does nothing else, contrary to people's expectations:  both Finder and Explorer would open the location in the browser pane.

Identical behavior is observed in the "Open File" dialog in GTK apps.

Other information:
Comment 1 Josselin Mouette 2007-01-09 23:18:14 UTC
Created attachment 79903 [details] [review]
Fix for nautilus 2.16.3

This is the patch we apply to nautilus 2.16 in Debian, initially taken from UHU Linux.
Comment 2 Stefano Teso 2007-03-11 19:54:39 UTC
I don't know if this is the right place to comment the patch, anyway...

With this patch manual sorting of bookmarks in the sidebar automatically activates bookmarks on drag, therefore changing the current location. Is this the expected behaviour?
Comment 3 Josselin Mouette 2007-03-29 20:01:49 UTC
Stefano>> this is expected using this patch. Another similar drawback is that, when you use it to umount/eject a device, it gets opened before.

The question is whether these drawbacks are acceptable. In the end, the patch makes the navigation more friendly in some cases, less friendly in other cases. I'm open to any suggestions on making it better.
Comment 4 Stefano Teso 2007-03-29 20:14:58 UTC
Josselin: IIRC, Thunar does this correctly (it does in Debian at least). I've been reading through its source code to find out how it did it (I'm learning GTK right now, and thus reading lots of source code) and found that its PlacesSidebar-like class overrides GtkWidget::button_press_event and GtkWidget::button_release_event with custom handlers. The solution is quite clean and elegant IMHO, and doesn't have any drawback that I can think of -- except for perhaps slightly increased complexity. Of course I may be wrong.
Comment 5 Josselin Mouette 2007-03-29 21:48:02 UTC
I have just tried to do things the Thunar way, but it isn't really satisfactory. I find popping up a menu on an element that isn't selected to be confusing; at least, it isn't done in any other GNOME application I know. The HIG says popup menus are about the "currently selected object" and I think it is relevant (and appropriate) in this case.
Comment 6 Stefano Teso 2007-03-29 22:30:43 UTC
Mmm... Why does the context menu pop up on a nonselected element? This isn't how Thunar works: the sidebar selection is updated correctly on e.g. right click, BUT the current browser location is not changed, except on left click.

I find this behaviour very satisfactory -- perhaps that's only my personal taste.
Comment 7 Sebastian Dröge (slomo) 2008-03-19 12:44:29 UTC
Ok, this patch breaks things unfortunately, see https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/189110

Does someone have a fixed patch? :)
Comment 8 Sebastian Dröge (slomo) 2008-03-19 12:46:09 UTC
Created attachment 107601 [details] [review]
places-sidebar_single-click.patch

Updated fix for nautilus 2.20/2.22 (which gives the bug above)
Comment 9 Sebastian Dröge (slomo) 2008-03-19 14:59:07 UTC
See bug #148828 for the rationale to go with single-click in the file chooser.

I'd say we should do the same for nautilus too for consistency reasons... just needs a working patch ;)
Comment 10 Cosimo Cecchi 2008-03-19 18:34:24 UTC
Created attachment 107643 [details] [review]
patch

Currently the Places sidebar respects the global click policy of Nautilus, and the setting of it is done on by a libeel helper eel_gtk_tree_view_set_activate_on_single_click (), which also handles the right click case right (it will select the item but it won't activate it when right clicking).
Attached patch makes the single click policy unconditional, as requested.
Comment 11 Cosimo Cecchi 2008-03-22 12:53:01 UTC
*** Bug 491899 has been marked as a duplicate of this bug. ***
Comment 12 Christian Neumair 2008-04-27 18:03:11 UTC
Cosimo: Thanks for working on this! Please commit the patch to trunk and to the GNOME 2.22 branch.
Comment 13 Cosimo Cecchi 2008-04-27 19:05:08 UTC
Committed as slightly modified version to adapt the patch to current trunk. Closing as FIXED.

http://svn.gnome.org/viewvc/nautilus?view=revision&revision=14102

2008-04-27  Cosimo Cecchi  <cosimoc@gnome.org>

	* src/nautilus-places-sidebar.c: (nautilus_places_sidebar_init):
	Always use single click policy in the Places sidebar. (#355760).