[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - framework/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Wed Mar 2 10:05:01 UTC 2016
framework/source/uielement/addonstoolbarmanager.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 499a34658e3a78d7b7c7c917eb739f8a1924c633
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Mon Feb 29 17:46:30 2016 +0100
tdf#98277 Extensions: Display shortcut in toolbar tooltip
(cherry picked from commits 3ff17bda5ba3e627e9b996506dc72b68cf67483b and 398fadca9a82917ed865e328ba454d8015803b66)
Change-Id: Icc16860d8b47a3724838fdb3dcb72dfb4398167d
Reviewed-on: https://gerrit.libreoffice.org/22805
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 7804108..5e57cd2 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -56,6 +56,7 @@
#include <vcl/taskpanelist.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/settings.hxx>
+#include <vcl/commandinfoprovider.hxx>
// namespaces
@@ -257,6 +258,10 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
m_pToolBar->InsertItem( nId, aTitle );
+ OUString aShortcut(vcl::CommandInfoProvider::Instance().GetCommandShortcut(aURL, m_xFrame));
+ if (!aShortcut.isEmpty())
+ m_pToolBar->SetQuickHelpText(nId, aTitle + " (" + aShortcut + ")");
+
// don't setup images yet, AddonsToolbarWrapper::populateImages does that.
// Create TbRuntimeItemData to hold additional information we will need in the future
More information about the Libreoffice-commits
mailing list