From 3c6e023f626f6630c2b7cceb368d0d58953a83d9 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 10 Jun 2009 14:03:55 +0000 Subject: [PATCH] Show binding associated to the lfun in the tooltip of a toolbar icon. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@30040 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiToolbar.cpp | 10 +++++++++- status.16x | 27 +++++++++++++++------------ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp index 095e4176a5..9137662d61 100644 --- a/src/frontends/qt4/GuiToolbar.cpp +++ b/src/frontends/qt4/GuiToolbar.cpp @@ -32,6 +32,7 @@ #include "Cursor.h" #include "FuncRequest.h" #include "FuncStatus.h" +#include "KeyMap.h" #include "Layout.h" #include "LyXFunc.h" #include "LyXRC.h" @@ -730,8 +731,15 @@ void GuiToolbar::setVisibility(int visibility) Action * GuiToolbar::addItem(ToolbarItem const & item) { + QString text = toqstr(item.label_); + // Get the keys bound to this action, but keep only the + // first one later + KeyMap::Bindings bindings = theTopLevelKeymap().findBindings(item.func_); + if (bindings.size()) + text += " [" + toqstr(bindings.begin()->print(KeySequence::ForGui)) + "]"; + Action * act = new Action(&owner_, getIcon(item.func_, false), - toqstr(item.label_), item.func_, toqstr(item.label_), this); + text, item.func_, text, this); actions_.append(act); return act; } diff --git a/status.16x b/status.16x index dd84cf1c9e..b88b3521cb 100644 --- a/status.16x +++ b/status.16x @@ -22,18 +22,6 @@ What's new ** Updates: *********** -* DOCUMENTATION AND LOCALIZATION - -- New Slovakian translation of the Introduction manual. - -- Updated Czech, German, Italian and Spanish localizations of the user - interface. - -- Updated English Additional Features manual. - -- Updated Intro manual for all languages. - - * DOCUMENT INPUT/OUTPUT - Implement separate chains for Japanese bibliography and index @@ -48,10 +36,25 @@ What's new warning for this specific master/child constellation over sessions (bug 3218). +- Tooltips for toolbat buttons now show the main shortcut associated + to the action. + - Tooltips for footnotes and some other insets now wrap, so they can actually be seen. +* DOCUMENTATION AND LOCALIZATION + +- New Slovakian translation of the Introduction manual. + +- Updated Czech, German, Italian and Spanish localizations of the user + interface. + +- Updated English Additional Features manual. + +- Updated Intro manual for all languages. + + * WINDOWS INSTALLER