* src/MenuBackend.C

(expandToolbar): remove unneeded variables buf and i; use
	the toolbar's gui_name.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15846 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-11-10 23:23:25 +00:00
parent e7251cf158
commit ec30adf554

View File

@ -759,17 +759,15 @@ void expandPasteRecent(Menu & tomenu, Buffer const * buf)
} }
void expandToolbars(Menu & tomenu, Buffer const * buf) void expandToolbars(Menu & tomenu)
{ {
// //
// extracts the toolbars from the backend // extracts the toolbars from the backend
ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin(); ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end(); ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
int i = 1; for (; cit != end; ++cit) {
for (; cit != end; ++cit, ++i) { docstring label = _(cit->gui_name);
docstring label = _(cit->name);
label = char_type(uppercase(label[0])) + label.substr(1);
// frontends are not supposed to turn on/off toolbars, if they can not // frontends are not supposed to turn on/off toolbars, if they can not
// update ToolbarBackend::flags. That is to say, ToolbarsBackend::flags // update ToolbarBackend::flags. That is to say, ToolbarsBackend::flags
// should reflect the true state of toolbars. // should reflect the true state of toolbars.
@ -856,7 +854,7 @@ void MenuBackend::expand(Menu const & frommenu, Menu & tomenu,
break; break;
case MenuItem::Toolbars: case MenuItem::Toolbars:
expandToolbars(tomenu, buf); expandToolbars(tomenu);
break; break;
case MenuItem::Branches: case MenuItem::Branches: