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 383354 - ctrl-L should make 'Location' entry disappear
ctrl-L should make 'Location' entry disappear
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 387858 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-07 13:27 UTC by John Pye
Modified: 2007-07-09 21:02 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
patch to implement the feature (3.27 KB, patch)
2006-12-27 09:46 UTC, Carlos Garnacho
needs-work Details | Review
updated patch (3.29 KB, patch)
2007-01-05 18:38 UTC, Carlos Garnacho
none Details | Review

Description John Pye 2006-12-07 13:27:59 UTC
The 'Location' bar in the GtkFileChooser is a useful feature, and the ability to make it appear by pressing ctrl-L is good.

But it's frustrating that it can't be made to disappear again with another press of 'ctrl-L'.

Because the Location box significantly changes the keyboard behaviour of the File Chooser, there should be a keyboard way of disabling it.

Other information:
Couple of asides:

(1) there should be some Yelp documentation somewhere that outlines all the keyboard shortcuts available from the FileChooser (eg I recently discovered alt-up).

(2) the Location icon isn't self explanatory. I hadn't even thought to click it until someone pointed it out.

(3) Maybe a 'help' button on the FileChooser would be a good thing?
Comment 1 Matthias Clasen 2006-12-08 03:11:01 UTC
I think thats a reasonable idea
Comment 2 Carlos Garnacho 2006-12-27 09:36:00 UTC
*** Bug 387858 has been marked as a duplicate of this bug. ***
Comment 3 Carlos Garnacho 2006-12-27 09:46:09 UTC
Created attachment 78937 [details] [review]
patch to implement the feature

Hi!,

this patch makes Ctrl+L toggle the location entry, the modification in list_selection_changed() prevents a failed assertion in update_chooser_entry() when the displayed folder changes and the location entry becomes NULL in the middle of the operation.
Comment 4 Matthias Clasen 2006-12-28 05:17:33 UTC
I run into the assertions in location_button_toggled_cb if I click on the button
after using C-L a few times.

I guess all calls to location_mode_set should pass TRUE as the last argument,
to keep the button state in sync with the visibility of the entry. That looks
more natural to me anyway.
Comment 5 Carlos Garnacho 2007-01-05 18:38:46 UTC
Created attachment 79473 [details] [review]
updated patch

Ouch! you're completely right, I didn't notice that... It seems that passing FALSE as the last argument to location_mode_set() is only suitable for location_button_toggled_cb(), would it be better to assume that we always want it to be TRUE, or is this approximation better?
Comment 6 Jaap A. Haitsma 2007-03-22 22:59:15 UTC
I see a potential usability problem with this patch for people who use both keyboard and mouse to select a file

1. I type a bit in the location dialog to navigate around
2. I then navigate a bit around with the mouse
3. I want to navigate again with keyboard so I press Ctrl+L
4. Oops location entry goes away. 
Comment 7 John Pye 2007-03-22 23:16:44 UTC
Ctrl-L is used to make the Location bar appear when it doesn't already appear. I would have thought that making at disappear again using ctrl-L was intuitive (c.f. F11 in Firefox, or F9 in gedit). 

You can use Alt-L to get to the field when it is already active as you are suggesting.
Comment 8 Jaap A. Haitsma 2007-03-22 23:21:49 UTC
(In reply to comment #7)
> Ctrl-L is used to make the Location bar appear when it doesn't already appear.
> I would have thought that making at disappear again using ctrl-L was intuitive
> (c.f. F11 in Firefox, or F9 in gedit). 
> 
> You can use Alt-L to get to the field when it is already active as you are
> suggesting.
> 
Good point. I did not think of Alt-L. In that case can one of the maintainers apply the patch?
Comment 9 Matthias Clasen 2007-03-23 05:08:44 UTC
2007-03-23  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c: Add a keybinding to
        toggle the visibility of the location entry.  (#383354,
        John Pye, patch by Carlos Garnacho)

Comment 10 Wouter Bolsterlee (uws) 2007-06-03 11:51:57 UTC
What about only hiding the location entry if it has focus instead of hiding it if it is visible? That would address all usability problems I think...
Comment 11 Matthias Clasen 2007-07-09 17:14:31 UTC
I consider this fixed, please file another bug if there are remaining issues.
Comment 12 Jaap A. Haitsma 2007-07-09 21:02:01 UTC
(In reply to comment #10)
> What about only hiding the location entry if it has focus instead of hiding it
> if it is visible? That would address all usability problems I think...
> 
I implemented this behavior in a patch in bug 455284