Always auto save previously saved listers on close

The title maybe be somewhat confusing, so let me explain:
I have many saved listers layouts. If I open a saved lister from Settings > Lister Layouts, work in that lister, open and close new tabs, and then close it, dopus will not save the new state/list of open tabs. I need to manually save that lister before closing. The only option that autosaves the lister layout on close, that I know of or could find in the settings, is the Update Default Lister automatically when closing a Lister. That is exactly what I would like to get not only on the default lister but on all saved layouts.

Because at it is, it is extremely in convenient in 2 ways:
[ol]
[li]When open and use the saved lister layout, I need to remember to save before closing, or loose the changes.[/li]
[li]This one is especially annoying. Because I use aforementioned option to update the default lister after closing a lister, I must remember to always open a default non named lister before opening any saved/named lister. and I must keep default lister open, even though I don't need it, until I close all the other listers, to keep that default lister's state and tabs unchanged. I hope I'm making sense...[/li][/ol]

If this functionality is the only way dopus works right now, please let me make a plea for a feature request:

  1. Set 1 "named" lister as "default". Or not, simply keep the unsaved/unnamed lister(s) apart from any saved/named listers.
  2. Make an option to auto save named listers on close. If I open a saved lister layout, make any changes to tabs and close it, dopus should recognise that this is a "saved/named" lister and auto save changes.

Even though dopus is amazing, for me personally this would make it so much faster and easier to use. Favorites are usefull, but autosaving saved/named listers on close would be ten times more useful.

Thanks in advance.

It's not built-in, but what you want may be possible (at least in theory) via a script that uses the OnCloseLister event.

(Unless the event runs too late for the layout to be saved. I'm not able to do a test at the moment.)

For people like me who arrived here to search for solution to this problem, but did not found it (reference):

I have wrote a script which auto-saves any custom Listers/Layouts on closing them. It also disallow these custom Listers to be saved as the default one. To me, this should be a built-in function, however the script turned out to be easy:

// Called when a Lister is closed
function OnCloseLister(closeListerData)
{
    if (closeListerData.lister.layout != "")
    {
        closeListerData.prevent_save = true;
        cmd = DOpus.Create.Command ();
        cmd.SetSourceTab (closeListerData.lister.activetab);
        cmd.RunCommand ("Prefs LAYOUTSAVE=updatecurrent,single");
    }
}
1 Like

Note that when the layout has multiple windows, the script will save over them with a single-lister layout of the last window from the layout that you closed.

1 Like