GNOME Bugzilla – Bug 165264
Recent file-chooser changes broke setting the folder for file-chooser-button.
Last modified: 2011-02-04 16:17:29 UTC
The gtk_file_chooser_set_current_folder() is broken. Call gtk_file_chooser_set_current_folder() with /some/path and the file-chooser-button sets its folder to a subfolder (i.e. /some/path/child). It should be set the folder to given path.
Created attachment 36672 [details] Screenshot demonstrating the problem. This is screenshot of testfilechooserbutton. Notice that the value for "Select Folder" is "CVS", but when "Test"->"Print Selected Path" is clicked the Folder is actually "/gnome/cvs/gtk+/tests".
Fixed on HEAD and gtk-2-6. 2005-02-02 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilechooserdefault.c (pending_select_paths_process): Don't select the first row if the chooser is not mapped. This happens when it's acting on behalf of GtkFileChooserButton. Also, don't select the first row if we are in SAVE or CREATE_FOLDER modes --- I had missed that (see the ChangeLog entry from 2005-01-18). Fixes #165264.
*** Bug 302087 has been marked as a duplicate of this bug. ***
Well, if you think bug 302087 is a dupe I'll have to reopen this. To summarize: A: gtk_file_chooser_set_uri ("/uri/to/statfuns.xls"); B: gtk_file_chooser_unselect_all (); C: gtk_file_chooser_set_current_name ("statfuns"); With cvs HEAD, A effectively gets done after both B and C.
Ah, good call. We have to clear the list of pending selections if someone calls unselect_all(). I'll close this bug and reopen the duplicate, which is about this particular problem. Sorry for the confusion :)