I didn't test it, but

> -if (tbb.flags & ToolbarBackend::ON)
> +// load last saved toolbasr status, if possible
> +lyx::Session & session = LyX::ref().session();
> +string visibleToolbars = session.loadSessionInfo("VisibleToolBars",
> false); +if (tbb.flags & ToolbarBackend::ON &
                                                    ^^^
this looks wrong.

Yes. session should override ToolbarBackend::ON/OFF.

> (visibleToolbars.empty() || visibleToolbars.find(tbb.name) != string::npos)
> ) tb_ptr->show(false);
> else
> tb_ptr->hide(false);
> @@ -142,6 +149,18 @@
> }

[...]

> +bool QLToolbar::isVisible()
> +{
> +return QToolBar::isVisible();
> +}

Do you plan similar functions for the toolbar position? For a toolbar GUI,
this needs to be saved, also "math" or "table" (i.e. context sensitive
visibility).

I do not know. I am not sure how much information people want to
save/restore. I do not know how to handle math/table toolbars either.
Anyway, I will add toolbar position in.

There is a *big* problem though: how to show a toolbar if all toolbars
are hidden? The right-click menu does not work any more. There should
definitely a toolbars -> (standard, ...) in the view menu.


Cheers,
Bo

Reply via email to