mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Move secondary toolbars to View->Toolbars->Other Toolbars.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25069 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
de2d7197c9
commit
cebd63f844
@ -1004,12 +1004,23 @@ void MenuDefinition::expandPasteRecent()
|
||||
|
||||
void MenuDefinition::expandToolbars()
|
||||
{
|
||||
MenuDefinition other_lists;
|
||||
// extracts the toolbars from the backend
|
||||
Toolbars::Infos::const_iterator cit = guiApp->toolbars().begin();
|
||||
Toolbars::Infos::const_iterator end = guiApp->toolbars().end();
|
||||
for (; cit != end; ++cit) {
|
||||
add(MenuItem(MenuItem::Command, qt_(cit->gui_name),
|
||||
FuncRequest(LFUN_TOOLBAR_TOGGLE, cit->name)));
|
||||
MenuItem const item(MenuItem::Command, qt_(cit->gui_name),
|
||||
FuncRequest(LFUN_TOOLBAR_TOGGLE, cit->name));
|
||||
if (guiApp->toolbars().isMainToolbar(cit->name))
|
||||
add(item);
|
||||
else
|
||||
other_lists.add(item);
|
||||
}
|
||||
|
||||
if (!other_lists.empty()) {
|
||||
MenuItem item(MenuItem::Submenu, qt_("Other Toolbars"));
|
||||
item.setSubmenu(other_lists);
|
||||
add(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,5 +323,11 @@ int Toolbars::defaultVisibility(std::string const & name) const
|
||||
}
|
||||
|
||||
|
||||
bool Toolbars::isMainToolbar(std::string const & name) const
|
||||
{
|
||||
return toolbar_visibility_.find(name) != toolbar_visibility_.end();
|
||||
}
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
@ -131,6 +131,8 @@ public:
|
||||
ToolbarInfo const * info(std::string const & name) const;
|
||||
///
|
||||
int defaultVisibility(std::string const & name) const;
|
||||
///
|
||||
bool isMainToolbar(std::string const & name) const;
|
||||
|
||||
private:
|
||||
/// all the defined toolbars
|
||||
|
Loading…
Reference in New Issue
Block a user