GNOME Bugzilla – Bug 355760
Side pane items shouldn't require a double click to open the location
Last modified: 2008-04-27 19:05:08 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:
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.
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?
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.
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.
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.
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.
Ok, this patch breaks things unfortunately, see https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/189110 Does someone have a fixed patch? :)
Created attachment 107601 [details] [review] places-sidebar_single-click.patch Updated fix for nautilus 2.20/2.22 (which gives the bug above)
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 ;)
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.
*** Bug 491899 has been marked as a duplicate of this bug. ***
Cosimo: Thanks for working on this! Please commit the patch to trunk and to the GNOME 2.22 branch.
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).