cui/source/customize/SvxToolbarConfigPage.cxx | 14 ++++++++++++++ cui/source/inc/SvxToolbarConfigPage.hxx | 2 ++ 2 files changed, 16 insertions(+)
New commits: commit 66e13a9b6ba020c8821e26eeefa9dbee81598f6b Author: Muhammet Kara <[email protected]> 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 <[email protected]> Reviewed-by: Katarina Behrens <[email protected]> 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
