GNOME Bugzilla – Bug 655514
Don't set the current folder while saving/opening a file
Last modified: 2012-07-07 15:34:49 UTC
Updated guidelines for writing Save dialogs - Make use of gtk_file_chooser_set_current_name() for File/Open and gtk_file_chooser_set_filename() for File/Save As (File/Save a Copy) Basically, gtk_file_chooser_set_current_folder() should not be used to set folders. http://people.gnome.org/~federico/news-2011-07.html#recent-folders
Fixed in git master. Thanks for reporting.
Does that mean one now has to a) select a folder, and b) click Save, instead of just b) click Save, when saving a copy of a document?
Yes, it seems so.
Reopening. Now, every time I want to save a copy of a pdf opened from the web browser, I can't just press return (after maybe adjusting the filename), but have to select the folder to save to, when I always save to the same folder (~/Dokumente). This is a clear worsening of usability; IMO this needs to be reverted.
The problem with saving by default to some place is that a) the default may not be correct (i.e. I store downloaded papers under ~/Documents/Articles/authors-last-name), and b) your default directory becomes a dumpster. That said, Evince calls its command "Save a copy". Most "Save as" commands should use gtk_file_chooser_set_filename() with the full path+basename. For most programs (e.g. GIMP), this is so that you can write out a "foobar-modified.jpg" in the same folder as the original file. However, Evince may be a bit different - AFAIK, PDFs are read-only (I don't know the details of PDFs with forms or things like that). If "Save a copy" is meant to be "put this somewhere else", maybe you want to move the file instead? (To properly file PDFs that get launched from a browser, I do the "Show in file manager" dance and move the file to its proper place...)
(In reply to comment #5) > The problem with saving by default to some place is that a) the default may not > be correct (i.e. I store downloaded papers under > ~/Documents/Articles/authors-last-name), and b) your default directory becomes > a dumpster. True. But for a), setting the last folder as default save-to folder does not prevent you from choosing a *different* folder than the default; it just forces *everyone* to select *a* folder when having a default and using that may do fine, and with no time lost to locate the desired folder (at least in my case it's located in the sidebar) and select it. Also, even if you do want to create a new folder ~/Documents/Articles/last-name, defaulting to ~/Documents/Articles will still save you having to select that folder first. > That said, Evince calls its command "Save a copy". Most "Save as" commands > should use gtk_file_chooser_set_filename() with the full path+basename. For > most programs (e.g. GIMP), this is so that you can write out a > "foobar-modified.jpg" in the same folder as the original file. Yes, it appears that evince's SaveAs is overloaded. First the usual "save a modified copy" e.g. when you've filled in a pdf form, and this 'downloaded pdf opened from browser' use case, which in pre-computer terms is just 'filing the paper away'. Using the full path to the existing file by default would be useless since that's in /tmp where I definitely do not want to store it permanently :-) > However, Evince may be a bit different - AFAIK, PDFs are read-only (I don't > know the details of PDFs with forms or things like that). If "Save a copy" is > meant to be "put this somewhere else", maybe you want to move the file instead? Yes, a move from /tmp to its destination would suffice instead of a copy, but /tmp is getting cleaned up periodically anyway. > (To properly file PDFs that get launched from a browser, I do the "Show in file > manager" dance and move the file to its proper place...) Now that's even more time-consuming :-)
Created attachment 218194 [details] [review] shell: Store and restore current folder when opening or saving file Remember the folder last used to open or save a document, attachment or image.
Review of attachment 218194 [details] [review]: I never liked the idea of not remembering the last folder used, so I like this approach, but the bug title says the opposite: "Don't set the current folder while saving/opening a file" so please, change the title, or open a new bug or simply don't include a link to the bug in the commit message.
Right, I forgot to change the title when I reopened this bug. I'll just remove the link from the commit msg. Pushed to master! :-) :-) WONTFIX as for the original request in comment 0.