GNOME Bugzilla – Bug 151608
hard to select shortcuts in filechooser directory selector
Last modified: 2011-02-04 16:16:11 UTC
In SELECT_FOLDER mode its hard to pick one of the directories in the list on the left. If you double click on e.g. "Desktop" and then click on "open" you just get a current folder changed even. However, if you after clicking on the list click on the the desktop button in the pathbar, then open will correctly select the desktop dir.
You are right. This happens in gtkfilechooserdefault.c:gtk_file_chooser_default_should_respond() in the case that checks for the shortcuts list being the last-focused widget. When activating a shortcuts row, we could set a flag that says "you just changed folders", and check for that in _should_respond(). [Another option would be to focus the file list when activating a shortcut... perhaps that would be better for this and for keynav in general]
Created attachment 31550 [details] [review] a patch Here is a patch which implements the solution proposed by federico: moving focus to the file list when a shortcut is activated. Additionally, it fixes some additional problems with should_respond() in save mode, e.g. when you enter a filename and click save, the filechooser doesn't go away, but switches to the selected folder (in the hidden file list).
2004-09-17 Matthias Clasen <mclasen@redhat.com> Improve the behaviour of the file chooser in save mode. Fixes bugs #151031, #151608, #151994 reported by Owen Taylor and Alexander Larsson. * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): (location_entry_create): Propagate the action to the file chooser entries. (gtk_file_chooser_default_should_respond): Switch folders if the user enters a directory name in the entry and clear the entry after switching folders. (gtk_file_chooser_default_should_respond, shortcuts_row_activated_cb): Move focus to the file list when activating a shortcut. (gtk_file_chooser_default_should_respond): Handle the case where the user clicks on "Save" after selecting a folder in the file list. * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property): Propagate the action to the file chooser entries. * gtk/gtkfilechooserentry.h: * gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_set_action): (_gtk_file_chooser_entry_get_action): New functions to propagate the GtkFileChooserAction of the file chooser to the file chooser entry. (check_completion_callback): If we are in save mode, only do inline completion for directories.