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 580560 - Backspace key does not go to the parent directory
Backspace key does not go to the parent directory
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2009-04-28 08:08 UTC by Nicolò Chieffo
Modified: 2009-06-15 18:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolò Chieffo 2009-04-28 08:08:03 UTC
In the FileChooser dialog (as it is done in nautilus) the enter key should open the selected directory (this works correctly), and the backspace key should go to the parent directory (this is instead missing): the user can browse faster using keyboard shortcuts!
Comment 1 Christian Dywan 2009-05-08 14:53:31 UTC
There is Alt+Up already for this, analoguous to Alt+Left, Alt+Right and Alt+Down.
Comment 2 Nicolò Chieffo 2009-05-08 15:20:13 UTC
Can't you try to unify things?
in windows explorer it's the backspace,
in windows open file it's the backspace,
in nautilus it's the backspace,
in thunar it's the backspace,
in firefox it's the backspace,
in dolphin it's the backspace.

I don't have macos x so I can't tell you about that.
Comment 3 Ruben Vermeersch 2009-06-15 02:10:10 UTC
Fixing up the summary a bit, as we shouldn't be making demands. However, as Nicolò correctly pointed out, this is highly inconsistent with the rest of the desktop.
Comment 4 Andrew Cowie 2009-06-15 02:54:36 UTC
I've run into this a bunch. Nautilus trained me that Backspace goes back/up when file choosing. It'd be nice if GtkFileChooser could behave this way as well. It seems the sort of thing that would help further improve and unify the GNOME desktop experience.

AfC
Comment 5 Nicolò Chieffo 2009-06-15 06:17:27 UTC
Thanks for accepting this
Comment 6 Federico Mena Quintero 2009-06-15 18:09:27 UTC
Interesting; GtkTreeView was eating our Backspace.

Fixed in commit 2b3de3dd75384a0af99f92656cdd70d72319ca6c.  From the commit message:

    bgo#580560 - Make Backspace work in the file chooser to to to the parent directory
    
    GtkFileChooserDefault actually implements a binding signal for
    Backspace, to make it go to the parent directory.  However,
    GtkTreeView was eating our Backspace, and thus the file chooser was
    not getting a chance to execute its binding signal.
    
    GtkTreeView implements a Backspace binding itself, which it uses to
    move to the parent node of the current cursor node.  However, the
    binding handler would return TRUE even if there was no parent to the
    current node.  Now the binding handler only returns TRUE if it
    actually changed the cursor.
    
    Additionally, gtk_tree_view_key_press() sees if no bindings handled a
    key press; in that case, it re-sends the key press to the treeview's
    search entry.  However, sending a Backspace to an empty entry makes
    the entry beep.  Thus, we add a flag that gets set from GtkTreeView's
    Backspace binding handler, to tell gtk_tree_view_key_press() when it
    should *not* re-emit the key press on the search entry.  Sort of,
    "yeah, I didn't handle this key press, but I don't want you to send it
    to the search entry, either!".
    
    Signed-off-by: Federico Mena Quintero <federico@novell.com>