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 662814 - Request for way to tell gtk_recent_manager_add_item_query_info to be silent about missing file.
Request for way to tell gtk_recent_manager_add_item_query_info to be silent a...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.0.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 664587 666034 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-10-26 23:27 UTC by clinton
Modified: 2013-04-17 00:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description clinton 2011-10-26 23:27:12 UTC
Currently, when using a GtkFileChooser in GTK_FILE_CHOOSER_ACTION_SAVE mode in our application, the act of entering in a non-existant file name and choosing to save causes a warning after the pattern:

Gtk-WARNING **: Unable to retrieve the file info for `file:///home/clinton/some.file': Error stating file '/home/clinton/some.file': No such file or directory

It appears that, upon the chooser adding a recently-used filename to the recent manager's list, gtk_recent_manager_add_item_query_info() eventually gets called, causing it to attempt to check the status of a file that doesn't exist yet and generate a warning, since we can only proceed to writing the file after we've gotten the filename from the chooser.

Since, depending on what an application is doing at the time, it may be expected that the named file may not exist yet, would it be possible to add an API to tell gtk_recent_manager_add_item_query_info() to fail quietly?
Comment 1 Joshua Immanuel 2011-11-15 10:12:33 UTC
This feature would be helpful.
Comment 2 Andreas J. Guelzow 2011-11-23 18:22:36 UTC
Until this feature is implemented or bug is fixed (depending on your point of view), you can suppress the warning with a log handler. (See for example our go_gtk_file_sel_dialog in goffice, ie. http://git.gnome.org/browse/goffice/commit/?id=d30d43c7d84a3a9ce75b93cd4dfa12a6bc4a868f )
Comment 3 Federico Mena Quintero 2011-11-23 20:44:09 UTC
Fix pushed to master as e8be9ec01.
Comment 4 Federico Mena Quintero 2011-11-23 20:45:33 UTC
*** Bug 664587 has been marked as a duplicate of this bug. ***
Comment 5 Federico Mena Quintero 2011-12-13 17:06:27 UTC
For reference, I just cherry-picked this into the gtk-3-2 branch as well.
Comment 6 Federico Mena Quintero 2011-12-13 17:08:06 UTC
... and into the gtk-2-24 branch, too.
Comment 7 Federico Mena Quintero 2011-12-13 17:09:44 UTC
*** Bug 666034 has been marked as a duplicate of this bug. ***