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 151608 - hard to select shortcuts in filechooser directory selector
hard to select shortcuts in filechooser directory selector
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-09-01 13:57 UTC by Alexander Larsson
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (1.56 KB, patch)
2004-09-14 18:45 UTC, Matthias Clasen
none Details | Review

Description Alexander Larsson 2004-09-01 13:57:45 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.
Comment 1 Federico Mena Quintero 2004-09-01 16:04:37 UTC
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]
Comment 2 Matthias Clasen 2004-09-14 18:45:47 UTC
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).
Comment 3 Matthias Clasen 2004-09-17 17:59:50 UTC
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.