So, when a toolbar is automatic, depending on where the cursor is in the document, different things are stored. Is there a way to tell that an automatic toolbar (say math) should be always visible or never visible? I do not see it.
Auto on/off has its own logic and session only controls whether or not a toolbar is shown lyx starts/closes. That is to say, even when math is on, if you click on a paragraph with text, the math toolbar will disappear. The always on/off feature of math/table toolbars, in my opinion, is none of session's business. It belongs to toolbar properties/preferences. I mean, there should be a toolbar dialog to set such properties (and individual icons), and session will then load/save toolbar status like standardToolbar on fileopen,filenew,blah mathToolbar alwaysOn toggleMath,insertSqrt, Right now, toolbars only have on/off information to save/restore.
What I meant is that session is a mechanism to store session-related data. The there are several users of this file which store cursor positions, opened files, maybe toolbar position, etc. There is no reason why we should take all or nothing. We can pick the session features we want.
Then, you will have both lastfiles(), and Session() in lyx_main.C (?) . If this is considered acceptable, I can provide a patch for 1.4.x. Cheers, Bo
