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 165264 - Recent file-chooser changes broke setting the folder for file-chooser-button.
Recent file-chooser changes broke setting the folder for file-chooser-button.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.6.x
Other All
: High major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-26 02:23 UTC by Dennis Cranston
Modified: 2011-02-04 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot demonstrating the problem. (117.82 KB, image/png)
2005-01-28 21:41 UTC, Dennis Cranston
Details

Description Dennis Cranston 2005-01-26 02:23:34 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.
Comment 1 Dennis Cranston 2005-01-28 21:41:22 UTC
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".
Comment 2 Federico Mena Quintero 2005-02-02 18:26:10 UTC
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.
Comment 3 Federico Mena Quintero 2005-04-28 20:10:53 UTC
*** Bug 302087 has been marked as a duplicate of this bug. ***
Comment 4 Morten Welinder 2005-04-29 14:15:45 UTC
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.
Comment 5 Federico Mena Quintero 2005-04-29 16:52:15 UTC
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 :)