Again: Restoring sessions

30 views
Skip to first unread message

rengel

unread,
Jul 31, 2016, 5:52:12 AM7/31/16
to leo-editor
I understand, that I can save and restore Leo sessions by using the
command line arguments '--session-save' and '--session-restore'.
This works fine with open files, but what about the size and position of the Leo window and the position of the splitter?

From my work with Qt I know that QSettings is a *very* elegant an convenient way to save and restore state.

Reinhard

Terry Brown

unread,
Aug 1, 2016, 10:16:44 AM8/1/16
to leo-e...@googlegroups.com
Thinking aloud:

Storing state's not a, problem Leo's doing that already.

For the window position, that seems to be saved, for me, in Windows,
based on the path to the .leo file. I wonder if it's different and /
or not saved / restored at all, with sessions. It's probably saved in
Linux too, I use a tiling window manager (i3), so I wouldn't know.

Splitter position, probably depends on whether an layout's been saved /
loaded for that outline or not. Once it has, the last saved / loaded
layout, incl. splitter position, should always be applied. I'm not
sure how the defaults work if no layout's ever been applied.

So, the window position probably needs investigation for behavior in
sessions. The splitter position - the layout might need explicitly
saving in --*-session modes.

Cheers -Terry

> Reinhard
>
Reply all
Reply to author
Forward
0 new messages