GNOME Bugzilla – Bug 662814
Request for way to tell gtk_recent_manager_add_item_query_info to be silent about missing file.
Last modified: 2013-04-17 00:23:27 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?
This feature would be helpful.
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 )
Fix pushed to master as e8be9ec01.
*** Bug 664587 has been marked as a duplicate of this bug. ***
For reference, I just cherry-picked this into the gtk-3-2 branch as well.
... and into the gtk-2-24 branch, too.
*** Bug 666034 has been marked as a duplicate of this bug. ***