]> git.lyx.org Git - lyx.git/commitdiff
* src/MenuBackend.C
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Nov 2006 23:23:25 +0000 (23:23 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Nov 2006 23:23:25 +0000 (23:23 +0000)
(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

src/MenuBackend.C

index 5e078de9dba82b7695dbd10208463bbd22c5a865..8fe76f10870cd2e69c282af8b6efdbfe449cdf47 100644 (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
        ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
        ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
 
-       int i = 1;
-       for (; cit != end; ++cit, ++i) {
-               docstring label = _(cit->name);
-               label = char_type(uppercase(label[0])) + label.substr(1);
+       for (; cit != end; ++cit) {
+               docstring label = _(cit->gui_name);
                // frontends are not supposed to turn on/off toolbars, if they can not
                // update ToolbarBackend::flags. That is to say, ToolbarsBackend::flags
                // should reflect the true state of toolbars.
@@ -856,7 +854,7 @@ void MenuBackend::expand(Menu const & frommenu, Menu & tomenu,
                        break;
 
                case MenuItem::Toolbars:
-                       expandToolbars(tomenu, buf);
+                       expandToolbars(tomenu);
                        break;
 
                case MenuItem::Branches: