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 643170 - gtk_file_chooser_set_filename does not work if "Show hidden files" is active
gtk_file_chooser_set_filename does not work if "Show hidden files" is active
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.24.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 615353 631914 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-02-24 08:34 UTC by ya.dam.vam.parabellum
Modified: 2011-10-26 23:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[GtkFileChooser] Fix initial selection when hidden files are shown (3.34 KB, patch)
2011-02-24 20:39 UTC, Federico Mena Quintero
committed Details | Review

Description ya.dam.vam.parabellum 2011-02-24 08:34:58 UTC
Steps to Reproduce:
Launch my small example (http://paste.ubuntu.com/571577/).
If "Show hidden files" flag is not active, directory "/etc" will be selected in the file chooser dialog as expexted.
If you set "Show hidden files" and than open file chooser dialog again, directory "etc" will not be selected.

So, function "gtk_file_chooser_set_filename" does not work if "Show hidden files" flag in file chooser settings is active.

The problem reproduces with Ubuntu 10.10 (GTK-2.22), Ubuntu 11.04 Alpha-2 and Gnome-3 Fedora LiveCD (GTK-2.24.0).
Comment 1 Federico Mena Quintero 2011-02-24 20:39:27 UTC
Created attachment 181868 [details] [review]
[GtkFileChooser] Fix initial selection when hidden files are shown

We were breaking prematurely out of the loop that goes through
each file that is pending selection; not only does that loop
disable filtering and show hidden files if needed, but it also
selects the files themselves.  So we need to walk the whole
list of files.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Comment 2 Federico Mena Quintero 2011-02-24 20:42:30 UTC
Attachment 181868 [details] pushed as 6c4196e - [GtkFileChooser] Fix initial selection when hidden files are shown
Comment 3 Federico Mena Quintero 2011-02-24 20:45:50 UTC
Pushed to gtk-2-24 as well as master.
Comment 4 Federico Mena Quintero 2011-02-24 20:49:37 UTC
*** Bug 631914 has been marked as a duplicate of this bug. ***
Comment 5 Ilya Murav'jov 2011-10-26 23:28:50 UTC
*** Bug 615353 has been marked as a duplicate of this bug. ***