GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Save current layout

Hi,

I'm interested in a way to force Dopus to save the current listers as a default layout, in the same way it's done when you close Dopus process.

Maybe by a button, but I don't want to create a new layout, just save it as the default layout.

Sometimes, when there is a system crash Dopus doesn't remember the last listers, and it opens the previous last lister.

A good thing would be to save the current layout each time a new tab is opened or closed, instead of doing it once the program is ended.

thx :slight_smile:

This button will do what you want, after you change the Layout name to the one you use by default.

<?xml version="1.0"?> <button display="both"> <label>Save All Listers as Default Layout</label> <tip>Save all open Listers as the default Lister Layout (change name accordingly)</tip> <icon1>199</icon1> <function type="normal"> <instruction>Prefs LAYOUTSAVE LAYOUTNAME=&quot;Default&quot;</instruction> </function> </button>

Read This FAQ: How to add example buttons to your toolbars and menus

Thx for that, but it's not exactly what I'm searching for.

What I would like to do, is to make Dopus remembers my listers and always keep in memory the last opened listers.

So, I set Dopus to "Open the Listers that were open when the program was last closed" and that's almost perfect.

The problem only occurs when I open Dopus after a system crash (we have some PB with electricity in this place...), it doesn't remember the last listers because Dopus wasn't closed properly, so it didn't save it.

So I only see two ways of resolving this :

  • change Dopus to make it save the current listers each time you open/close one, instead of just saving them when you close the whole program.

  • make a button wich I can press to save the listers in the current layout scheme, in order to recover them after a power failure. (without manually loading a specific layout)

What do you think about it ?

That is exactly what the button I posted above does. The button doesn't load anything. You click the button and it saves every lister you currently have open as a Lister Layout. You then configure Opus Preferences to open the same Lister Layout each time Opus starts up.

Currently the button I posted saves everything to a Lister Layout named Default. So as you see in the screen grab below, that is the Lister Layout used to open Opus the next time. If you are using a different name, change the name in both places (the button and the Preferences setting below).


Ok, i get this, but if you close Dopus without using your button first, you can't get back your last opened listers.

That's the bad part of the solution.

We can get around that too, provided you are closing Opus yourself. Every place in your Opus configuration, where you have a button or menu item to close or exit Opus, edit the command as displayed below (again, changing Default to the Lister Layout name that you are using).

Prefs LAYOUTSAVE LAYOUTNAME="Default" Close PROGRAM

Then when you click on these buttons/menu items to exit Opus, your Layout will automatically be saved. The next time you Open Opus, it will be restored.

Opus has a Default Lister, but it doesn't really have a Default Lister Layout. But by using everything I've posted in this thread, you pretty much get the same thing as a Default Lister Layout.