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 322926 - FileChooser: Alt-Shift-Down should work like Alt-Down
FileChooser: Alt-Shift-Down should work like Alt-Down
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.8.x
Other Linux
: Normal enhancement
: Small fix
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2005-12-01 13:22 UTC by Murray Cumming
Modified: 2011-01-29 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do the same thing as ALT-Down when getting ALT-SHIFT-Down (640 bytes, patch)
2011-01-27 13:25 UTC, Tristan Van Berkom
none Details | Review
Add shifted bindings for "folder-up" and "folder-down" (3.26 KB, patch)
2011-01-28 07:17 UTC, Tristan Van Berkom
accepted-commit_now Details | Review

Description Murray Cumming 2005-12-01 13:22:06 UTC
In the file chooser, I can open a folder with Alt-Down. It does that to be like
Nautilus. In Nautilus, I can also do Alt-Shift-Down to
open-and-close-the-current-folder.

I know close-the-current-folder. wouldn't be meaningful in the FileChooser, but
I think it would make sense for Alt-Shift-Down to do exactly the same as
Alt-Down, instead of nothing.
Comment 1 Federico Mena Quintero 2007-01-25 16:44:05 UTC
This is easy to fix.  Care to give us a patch? :)
Comment 2 Tristan Van Berkom 2011-01-27 13:25:56 UTC
Created attachment 179433 [details] [review]
Do the same thing as ALT-Down when getting ALT-SHIFT-Down

From what I understand this patch is all that's needed.

Any particular documentation that should be updated with this ?
Comment 3 Tristan Van Berkom 2011-01-27 13:31:25 UTC
Wait... this bug could be obsolete somehow.

It seems this is based on an old filechooser implementation.

Currently ALT-Up/Down are used to navigate the depth
of the GtkPathBar in the top section of the filechooser.

Not sure what should be done with this, should we just close this ?
Comment 4 Murray Cumming 2011-01-27 13:45:20 UTC
(In reply to comment #3)
> Wait... this bug could be obsolete somehow.
> 
> It seems this is based on an old filechooser implementation.
> 
> Currently ALT-Up/Down are used to navigate the depth
> of the GtkPathBar in the top section of the filechooser.

Well, that's almost the same thing, right? It doesn't open folders that are not in the path already, but it's close. I guess that Alt-Shift-Up/Down should still do the same as Alt-Up/Down.

That I can no longer use these to open a folder, like I can in Nautilus, would be another bug.
Comment 5 Federico Mena Quintero 2011-01-27 18:47:26 UTC
Please commit your patch with a little change:

Can you please add an function add_normal_and_shifted_binding(binding_set, key, mods, "signal-name")?  And then from class_init() just call

  add_normal_and_shifted_binding (binding_set, GDK_Up, GDK_MOD1_MASK, "up-folder");
  add_normal_and_shifted_binding (binding_set, GDK_KP_UP, GDK_MOD1_MASK, "up-folder");

and likewise for the down-folder ones.

The relevant docs are in gtkfilechooser.c - grep in it for "up-folder"; there's a big-ass docstring in there somewhere :)  Thanks!
Comment 6 Tristan Van Berkom 2011-01-28 07:17:35 UTC
Created attachment 179491 [details] [review]
Add shifted bindings for "folder-up" and "folder-down"

Ok this one updates the documentation and adds the shifted modifiers
for "folder-up"/"folder-down" by adding a convenience function as
Federico requested.

Ok to commit ?
Comment 7 Matthias Clasen 2011-01-28 16:45:50 UTC
Review of attachment 179491 [details] [review]:

Looks fine to me
Comment 8 Federico Mena Quintero 2011-01-28 18:47:07 UTC
Review of attachment 179491 [details] [review]:

Perfect :)  Please go ahead and commit.
Comment 9 Tristan Van Berkom 2011-01-29 11:00:01 UTC
Thanks, pushed.