]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarBackend.cpp
* Only enter inset which return true on isActive(). This is the behavior in the curso...
[lyx.git] / src / ToolbarBackend.cpp
index a4da7dfd559a5703ab62cf37895036943a525e74..9738b0597c3026247ff0992f88f6f91f6d750c04 100644 (file)
@@ -92,7 +92,7 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                TO_ICONPALETTE,
                TO_LAST
        };
-       
+
        struct keyword_item toolTags[TO_LAST - 1] = {
                { "end", TO_ENDTOOLBAR },
                { "iconpalette", TO_ICONPALETTE },
@@ -165,7 +165,7 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                                add(ToolbarItem(ToolbarItem::POPUPMENU, name, label));
                        }
                        break;
-                       
+
                case TO_ICONPALETTE:
                        if (lex.next(true)) {
                                string const name = lex.getString();
@@ -174,17 +174,20 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                                add(ToolbarItem(ToolbarItem::ICONPALETTE, name, label));
                        }
                        break;
-                       
+
                case TO_LAYOUTS:
                        add(ToolbarItem(ToolbarItem::LAYOUTS,
                                FuncRequest(kb_action(ToolbarItem::LAYOUTS))));
                        break;
-                       
+
                case TO_TABLEINSERT:
-                       add(ToolbarItem(ToolbarItem::TABLEINSERT,
-                               FuncRequest(kb_action(ToolbarItem::TABLEINSERT))));
+                       if (lex.next(true)) {
+                               docstring const tooltip = lex.getDocString();
+                               add(ToolbarItem(ToolbarItem::TABLEINSERT,
+                                       FuncRequest(kb_action(ToolbarItem::TABLEINSERT)), tooltip));
+                       }
                        break;
-                       
+
                case TO_ENDTOOLBAR:
                        quit = true;
                        break;
@@ -215,7 +218,7 @@ void ToolbarBackend::readToolbars(Lexer & lex)
                TO_ENDTOOLBARSET,
                TO_LAST
        };
-       
+
        struct keyword_item toolTags[TO_LAST - 1] = {
                { "end", TO_ENDTOOLBARSET },
                { "toolbar", TO_TOOLBAR }