! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Make mousepad remember last save location
Status:
RESOLVED: FIXED
Product:
Mousepad
Component:
General

Comments

Description Laurentius 2018-01-15 14:31:05 CET
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.
Comment 1 Matthew Brush editbugs 2018-01-15 14:54:58 CET
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.
Comment 2 Laurentius 2018-01-16 18:30:21 CET
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)
Comment 3 Laurentius 2018-01-16 18:56:25 CET
(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)
Comment 4 Matthew Brush editbugs 2018-01-17 01:17:27 CET
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?)
Comment 5 Laurentius 2018-01-19 13:45:32 CET
Created attachment 7545 
Lack of Recent at the top of Mousepad save dialog (linuxmint 18.3 xfce)
Comment 6 Laurentius 2018-01-19 13:50:13 CET
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)
Comment 7 Laurentius 2018-01-19 14:44:32 CET
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?
Comment 8 Matthew Brush editbugs 2018-01-19 15:46:17 CET
(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.
Comment 9 Theo Linkspfeifer editbugs 2019-04-24 17:26:17 CEST
The "Recent" entry was completely removed. More info: https://bugzilla.gnome.org/show_bug.cgi?id=781819
Comment 10 Theo Linkspfeifer editbugs 2019-11-17 21:16:51 CET
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.
Comment 11 Git Bot editbugs 2019-12-21 17:41:07 CET
Theo Linkspfeifer referenced this bugreport in commit 98614c689a47ae9d621c925871a9c3ae2f18d86a

Remember last save location (Bug #14165)

https://git.xfce.org/apps/mousepad/commit?id=98614c689a47ae9d621c925871a9c3ae2f18d86a
Comment 12 Andre Miranda editbugs 2019-12-21 17:42:04 CET
LGTM, I just made a small modification to set last_save_location to NULL after free.

Bug #14165

Reported by:
Laurentius
Reported on: 2018-01-15
Last modified on: 2019-12-21

People

Assignee:
Matthew Brush
CC List:
3 users

Version

Target Milestone:
Mousepad 0.4.x

Attachments

Additional information