]> git.lyx.org Git - features.git/commitdiff
Fix bug 3508:
authorJürgen Spitzmüller <spitz@lyx.org>
Sun, 6 May 2007 07:26:51 +0000 (07:26 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sun, 6 May 2007 07:26:51 +0000 (07:26 +0000)
* src/ToolbarBackend.cpp:
* lib/ui/stdtoolbars.inc:
- add tooltip to table widget
* src/frontends/qt4/QLToolbar.cpp:
- display tooltip as icon text

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18208 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ui/stdtoolbars.inc
src/ToolbarBackend.cpp
src/frontends/qt4/QLToolbar.cpp

index 6b74f906696d908490ef5fff4b8aa39faaf04f8a..78a45428681f3f1193bbb7994675e5f394488f0a 100644 (file)
@@ -30,7 +30,7 @@
 #
 #   Minibuffer adds the command buffer (Qt only, only one may exist)
 #
-#   TableInsert adds a special widget for quick insertion of tables
+#   TableInsert "The tooltip" adds a special widget for quick insertion of tables
 #
 #   PopupMenu "name" "GUI Name"
 #
@@ -74,7 +74,7 @@ ToolbarSet
                Separator
                Item "Insert math" "math-mode"
                Item "Insert graphics" "dialog-show-new-inset graphics"
-               TableInsert
+               TableInsert "Insert table"
        End
        
        Toolbar "extra" "Extra"
index a4da7dfd559a5703ab62cf37895036943a525e74..948a5ae9a12305df7cd4636be81872cb95c9ea8d 100644 (file)
@@ -181,8 +181,11 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                        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:
index 008b13a3f67c55ca958666a06e06bcd929705a78..db2f6570ee0f229c3c3dc85473dea743cf8d98ae 100644 (file)
@@ -197,6 +197,7 @@ void QLToolbar::add(ToolbarItem const & item)
                tb->setIcon(QPixmap(toqstr(getIcon(FuncRequest(LFUN_TABULAR_INSERT)))));
                tb->setToolTip(qt_(to_ascii(item.label_)));
                tb->setStatusTip(qt_(to_ascii(item.label_)));
+               tb->setText(qt_(to_ascii(item.label_)));
                InsertTableWidget * iv = new InsertTableWidget(owner_, tb);
                connect(tb, SIGNAL(clicked(bool)), iv, SLOT(show(bool)));
                connect(iv, SIGNAL(visible(bool)), tb, SLOT(setChecked(bool)));