* 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
#
# 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"
#
Separator
Item "Insert math" "math-mode"
Item "Insert graphics" "dialog-show-new-inset graphics"
- TableInsert
+ TableInsert "Insert table"
End
Toolbar "extra" "Extra"
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:
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)));