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 663573 - Rework GtkFileChooserEntry
Rework GtkFileChooserEntry
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other All
: Normal normal
: ---
Assigned To: Benjamin Otte (Company)
Federico Mena Quintero
: 632394 (view as bug list)
Depends on: 663570
Blocks:
 
 
Reported: 2011-11-07 15:39 UTC by Benjamin Otte (Company)
Modified: 2011-12-16 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Otte (Company) 2011-11-07 15:39:20 UTC
I've just pushed a filechooserentry branch to GTK:
http://git.gnome.org/browse/gtk+/log/?h=filechooserentry

It goes best together with the code from bug 663570 which speeds up enumerations considerably.

I had the following goals in mind when redoing this branch (somewhat in order of importance):

- Make the tab key work consistently.
In current code it sometimes fails to work. This is either for speed reasons (the directory is not completely loaded yet when pressing the tab key) or due to the tab key not completing, but moving focus.

- Emulate bash
The code should behave like bash, so completion behavior learned in the terminal is applicable to the file chooser. There's of course some additional things we have (asyncness, selections and the completion popup), so I didn't make a 1:1 copy, but at least key sequences with the tab key should translate 1:1.

- Integrate with modern APIs
The current code was written before a bunch of the current features existed and duplicates a lot of things, often in slightly different behaviors. So I tried to use things like gio, GtkEntryCompletion and GtkFileSystemModel more. As a bonus, that would reduce the amount of code.
Comment 1 Federico Mena Quintero 2011-11-17 20:15:11 UTC
This works really well!  Good job!

I've found a few problems - in order of importance:

- Save mode in recent-files mode used to flame you if you typed "foo" and then Enter without selecting a folder.  Now it just confirms /home/federico/foo.  I *think* this may be due to the entry starting with a base_folder of $HOME, whereas previously it had NULL.

- Save mode should only do explicit completion (requiring you to press Tab), not autocompletion like it is now.

- Hitting Tab should bring up the completion list, even if there is no file part yet.  For example, type /usr/lib/[TAB] sometimes makes the list that pops up after typing the last / disappear - it should leave the list there, or if the list is not present, it should pop it up.

Fix the first two and it's ready for merging, I'll say.  This works really nicely.

If possible, pressing Tab additional times should make the completion list scroll.  As discussed on IRC some weeks ago, this probably needs to go in GtkEntryCompletion or something.
Comment 2 Federico Mena Quintero 2011-11-29 23:12:04 UTC
*** Bug 632394 has been marked as a duplicate of this bug. ***
Comment 3 Benjamin Otte (Company) 2011-12-16 19:11:42 UTC
Fixed the issues you pointed out and pushed to master so it hits the 3.3.6 release.