Hello. I'm having this issue: When i save a file with Mousepad, the file chooser dialog opens at the $HOME directory by default and I select a folder to save it. Then, when saving the next file, i would expect that the File chooser dialog offers the last location where i had saved the previous file. Instead, it is the default $HOME folder offered again and i have to navigate again through the folder tree to find the folder (when i realize). In order to save time, i would like Mousepad to remember last save location. Specially, when other apps usually follow that standard behavior. Is there a way to achieve that at the 0.4.0 version of Mousepad or in other version? I had asked at the xfce.forum.org and i was suggested there to ask here. Thank you. Using Linuxmint 18.3 XFCE. Mousepad 0.4.0 from repositories.
At least when built against Gtk3, it should default to show recent files/directories and the one you just saved in should be right at the top.
Hello Matthew, I don't find it that way or i do not understand you. I don't find that "recent files/directories" at the top of the File chooser dialog. BUT I had not described what is happening accurately. Today i realized that it is not the $HOME folder the default for saving files. Mousepad always offers to save the files where each instance of the app was opened from, no matter where you save the files, So, if I launch mousepad from the whisker menu or the application finder, it launches and offers to save files always at $HOME folder. Else, if mousepad is launched from another location, eg, clicking a file at the file manager at ~/Downloads, for example, (or, in a terminal: ~/Downloads$ mousepad) mousepad will always offer to save that file and new ones (new tabs of that instance of mousepad, or new windows opened from THIS instance (Ctrl+Shift+N)) at ~/Downloads, no matter where you have saved the previous files. At least, this is a little better than what i thought before: I have to launch the app from where i will probably want to save the following files. I hope to be clear (english is not my first language)
(In reply to Laurentius from comment #2) Definitely, i think I misunderstood Matthew. Sorry, just ignore the 2 first lines of my previous post (i don't know how to delete them)
Like in this screenshot: https://developer.gnome.org/gtk3/stable/filechooser.png So do you find the "Recent" files/directory feature sufficient? (ie. shall I close this bug report?)
Created attachment 7545 Lack of Recent at the top of Mousepad save dialog (linuxmint 18.3 xfce)
The point is that -in my system, at least- there is no such a "Recent" item at the top of the File chooser dialog when using mousepad. As you said, "it should" be there, but there is not. Does it appear on yours? I'll check out another system. I do find that "Recent" item when saving with other apps, like xed, the default text editor of Linuxmint, in which the "remember" feature works too, but not in Mousepad. As I tried to explain, I found a workaround: first navigate to the folder that I am probably be editing my files, then open one file there with Mousepad, then Mousepad will save next files there. But I think it would be useful to have the "remember last save location" feature, (or, at least, the "Recent" item)
That said, i must say i'm starting to get used to current Mousepad behaviour, the "workaround", what we can call the "Remember first" feature (instead of the more commonly used "Remember last" and "Recent" alternatives). If it is sufficient, or not, i can not say. I'm just getting used to it, and lets me work. But it is not the standard. If that is what developers think it should do, it's ok. Let's make a preferences option available! (Take a look at this Jerry3904's post: https://forum.xfce.org/viewtopic.php?pid=47042#p47042) By the way, Is there a way to edit posts after submit here?
(In reply to Laurentius from comment #6) > Does it appear on yours? I'll check out another system. It does, but I had it backwards, it's in the (default) Gtk2 build, I just tried re-building against Gtk3 and it no longer has Recent view. It's probably something that can be (re)enabled in code. > By the way, Is there a way to edit posts after submit here? I don't believe so.
The "Recent" entry was completely removed. More info: https://bugzilla.gnome.org/show_bug.cgi?id=781819
Created attachment 9262 proposed patch Please test the attached patch. Note that the file chooser adds an entry for the current working directory to the side bar, so navigating back there is not a problem.
Theo Linkspfeifer referenced this bugreport in commit 98614c689a47ae9d621c925871a9c3ae2f18d86a Remember last save location (Bug #14165) https://git.xfce.org/apps/mousepad/commit?id=98614c689a47ae9d621c925871a9c3ae2f18d86a
LGTM, I just made a small modification to set last_save_location to NULL after free.