[Libreoffice-commits] core.git: Branch 'feature/gsoc17-revamp-customize-dialog' - cui/source

Muhammet Kara muhammet.kara at pardus.org.tr
Mon Aug 14 13:21:40 UTC 2017


 cui/source/customize/SvxToolbarConfigPage.cxx |   14 ++++++++++++++
 cui/source/inc/SvxToolbarConfigPage.hxx       |    2 ++
 2 files changed, 16 insertions(+)

New commits:
commit 66e13a9b6ba020c8821e26eeefa9dbee81598f6b
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date:   Sun Aug 13 07:36:46 2017 +0300

    Initialize and update command categories and functions for the Toolbar tab
    
    Change-Id: I27a12fc9e337796fc153e1d243eeba37564ef5c1
    Reviewed-on: https://gerrit.libreoffice.org/41104
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index e6d52476c330..51f7d0485ae4 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -125,6 +125,8 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
         LINK( this, SvxToolbarConfigPage, SelectToolbar ) );
     m_pContentsListBox->SetSelectHdl(
         LINK( this, SvxToolbarConfigPage, SelectToolbarEntry ) );
+    m_pCommandCategoryListBox->SetSelectHdl(
+        LINK( this, SvxToolbarConfigPage, SelectCategory ) );
 
     m_pMoveUpButton->SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) );
     m_pMoveDownButton->SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) );
@@ -291,6 +293,12 @@ void SvxToolbarConfigPage::Init()
 
     m_pTopLevelListBox->SelectEntryPos(nPos);
     m_pTopLevelListBox->GetSelectHdl().Call(*m_pTopLevelListBox);
+
+    m_pCommandCategoryListBox->Init(
+        comphelper::getProcessComponentContext(),
+        m_xFrame,
+        vcl::CommandInfoProvider::GetModuleIdentifier(m_xFrame));
+    m_pCommandCategoryListBox->categorySelected( m_pFunctions );
 }
 
 SaveInData* SvxToolbarConfigPage::CreateSaveInData(
@@ -308,6 +316,12 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectToolbarEntry, SvTreeListBox *, void
     UpdateButtonStates();
 }
 
+IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectCategory, ListBox&, void )
+{
+    m_pCommandCategoryListBox->categorySelected( m_pFunctions );
+}
+
+
 void SvxToolbarConfigPage::UpdateButtonStates()
 {
     m_pDescriptionField->SetText("");
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx
index 02a23979865e..21d63fbe81ff 100644
--- a/cui/source/inc/SvxToolbarConfigPage.hxx
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -56,6 +56,8 @@ private:
     DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog&, void );
     DECL_LINK( MoveHdl, Button *, void );
 
+    DECL_LINK( SelectCategory, ListBox&, void );
+
     void            UpdateButtonStates() override;
     short           QueryReset() override;
     void            Init() override;


More information about the Libreoffice-commits mailing list