framework/source/uielement/addonstoolbarmanager.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 499a34658e3a78d7b7c7c917eb739f8a1924c633
Author: Samuel Mehrbrodt <[email protected]>
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 <[email protected]>
    Reviewed-by: Katarina Behrens <[email protected]>

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
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to