]> git.lyx.org Git - lyx.git/blobdiff - src/MenuBackend.C
Remove unused font variable which caused a warning.
[lyx.git] / src / MenuBackend.C
index f7aaa81e460be287a830d3db861ba7a1d1872da2..98f15391751897a431146c7f011da9dcbf444bf2 100644 (file)
@@ -135,9 +135,9 @@ Menu & Menu::read(LyXLex & lex)
                        optional = true;
                        // fallback to md_item
                case md_item: {
-                       lex.next();
+                       lex.next(true);
                        string const name = _(lex.GetString());
-                       lex.next();
+                       lex.next(true);
                        string const command = lex.GetString();
                        add(MenuItem(MenuItem::Command, name, 
                                     command, optional));
@@ -186,9 +186,9 @@ Menu & Menu::read(LyXLex & lex)
                        break;
                        
                case md_submenu: {
-                       lex.next();
+                       lex.next(true);
                        string mlabel = _(lex.GetString());
-                       lex.next();
+                       lex.next(true);
                        string mname = lex.GetString();
                        add(MenuItem(MenuItem::Submenu, mlabel, mname));
                        break;
@@ -251,7 +251,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
 {
        for (const_iterator cit = begin();
             cit != end() ; ++cit) {
-               switch ((*cit).kind()) {
+               switch (cit->kind()) {
                case MenuItem::Lastfiles: {
                        int ii = 1;
                        LastFiles::const_iterator lfit = lastfiles->begin();
@@ -305,7 +305,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
                        Formats formats;
                        
                        kb_action action;
-                       switch ((*cit).kind()) {
+                       switch (cit->kind()) {
                        case MenuItem::ImportFormats:
                                formats = Importer::GetImportableFormats();
                                action = LFUN_IMPORT;
@@ -331,7 +331,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
                                if ((*fit)->dummy())
                                        continue;
                                string label = (*fit)->prettyname();
-                               if ((*cit).kind() == MenuItem::ImportFormats)
+                               if (cit->kind() == MenuItem::ImportFormats)
                                        if ((*fit)->name() == "text")
                                                label = _("Ascii text as lines");
                                        else if ((*fit)->name() == "textparagraph")
@@ -355,7 +355,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
                                int const action =  lyxaction
                                        .getPseudoAction(LFUN_FLOAT_LIST,
                                                         cit->second.type());
-                               string label = "List of ";
+                               string label = _("List of ");
                                label += cit->second.name();
                                tomenu.add(MenuItem(MenuItem::Command,
                                                    label, action));
@@ -368,12 +368,21 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
                        FloatList::const_iterator cit = floatList.begin();
                        FloatList::const_iterator end = floatList.end();
                        for (; cit != end; ++cit) {
+                               // normal float
                                int const action = lyxaction
                                        .getPseudoAction(LFUN_INSET_FLOAT,
                                                         cit->second.type());
                                string const label = cit->second.name();
                                tomenu.add(MenuItem(MenuItem::Command,
                                                    label, action));
+                               
+                               // and the wide version
+                               int const action2 = lyxaction
+                                       .getPseudoAction(LFUN_INSET_WIDE_FLOAT,
+                                                        cit->second.type());
+                               string const label2 = _("Wide ") + label;
+                               tomenu.add(MenuItem(MenuItem::Command,
+                                                   label2, action2));
                        }
                }
                break;
@@ -429,7 +438,7 @@ void MenuBackend::read(LyXLex & lex)
                        menubar = true;
                        // fallback to md_menu
                case md_menu: {
-                       lex.next();
+                       lex.next(true);
                        string name = lex.GetString();
                        if (hasMenu(name)) {
                                if (getMenu(name).menubar() == menubar) {