Kaydet (Commit) 60d622d8 authored tarafından Muhammet Kara's avatar Muhammet Kara Kaydeden (comit) Katarina Behrens

Implement "Remove" button in the Customize dialog

By using the already implemented DeleteSelectedContent function.

Now toolbar and menu/context menu items can be removed by using
the "Remove" (Left Arrow) button which is between the commands
list and the enrtries list boxes.

Change-Id: If445ec6d431bc10263d961563bdd204e7868b931
Reviewed-on: https://gerrit.libreoffice.org/41272Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst c525dc76
...@@ -126,7 +126,7 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe ...@@ -126,7 +126,7 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe
m_pMoveDownButton->SetClickHdl ( LINK( this, SvxConfigPage, MoveHdl) ); m_pMoveDownButton->SetClickHdl ( LINK( this, SvxConfigPage, MoveHdl) );
m_pAddCommandButton->SetClickHdl( LINK( this, SvxMenuConfigPage, AddCommandHdl ) ); m_pAddCommandButton->SetClickHdl( LINK( this, SvxMenuConfigPage, AddCommandHdl ) );
//m_pRemoveCommandButton->SetClickHdl( LINK( this, SvxMenuConfigPage, RemoveCommandHdl ) ); m_pRemoveCommandButton->SetClickHdl( LINK( this, SvxMenuConfigPage, RemoveCommandHdl ) );
} }
SvxMenuConfigPage::~SvxMenuConfigPage() SvxMenuConfigPage::~SvxMenuConfigPage()
...@@ -297,10 +297,14 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, AddCommandHdl, Button *, void ) ...@@ -297,10 +297,14 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, AddCommandHdl, Button *, void )
AddFunction(); AddFunction();
} }
/*IMPL_LINK_NOARG( SvxMenuConfigPage, RemoveCommandHdl, Button *, void ) IMPL_LINK_NOARG( SvxMenuConfigPage, RemoveCommandHdl, Button *, void )
{ {
//TODO:Implement DeleteSelectedContent();
}*/ if ( GetSaveInData()->IsModified() )
{
UpdateButtonStates();
}
}
SaveInData* SvxMenuConfigPage::CreateSaveInData( SaveInData* SvxMenuConfigPage::CreateSaveInData(
const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr, const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
......
...@@ -136,7 +136,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe ...@@ -136,7 +136,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
m_pMoveUpButton->Enable(); m_pMoveUpButton->Enable();
m_pAddCommandButton->SetClickHdl( LINK( this, SvxToolbarConfigPage, AddCommandHdl ) ); m_pAddCommandButton->SetClickHdl( LINK( this, SvxToolbarConfigPage, AddCommandHdl ) );
//m_pRemoveCommandButton->SetClickHdl( LINK( this, SvxToolbarConfigPage, RemoveCommandHdl ) ); m_pRemoveCommandButton->SetClickHdl( LINK( this, SvxToolbarConfigPage, RemoveCommandHdl ) );
// default toolbar to select is standardbar unless a different one // default toolbar to select is standardbar unless a different one
// has been passed in // has been passed in
...@@ -329,10 +329,10 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, AddCommandHdl, Button *, void ) ...@@ -329,10 +329,10 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, AddCommandHdl, Button *, void )
AddFunction(); AddFunction();
} }
/*IMPL_LINK_NOARG( SvxToolbarConfigPage, RemoveCommandHdl, Button *, void ) IMPL_LINK_NOARG( SvxToolbarConfigPage, RemoveCommandHdl, Button *, void )
{ {
//TODO:Implement DeleteSelectedContent();
}*/ }
void SvxToolbarConfigPage::UpdateButtonStates() void SvxToolbarConfigPage::UpdateButtonStates()
......
...@@ -57,7 +57,7 @@ private: ...@@ -57,7 +57,7 @@ private:
DECL_LINK( SelectCategory, ListBox&, void ); DECL_LINK( SelectCategory, ListBox&, void );
DECL_LINK( AddCommandHdl, Button *, void ); DECL_LINK( AddCommandHdl, Button *, void );
//DECL_LINK( RemoveCommandHdl, Button *, void ); DECL_LINK( RemoveCommandHdl, Button *, void );
void Init() override; void Init() override;
void UpdateButtonStates() override; void UpdateButtonStates() override;
......
...@@ -58,7 +58,7 @@ private: ...@@ -58,7 +58,7 @@ private:
DECL_LINK( SelectCategory, ListBox&, void ); DECL_LINK( SelectCategory, ListBox&, void );
DECL_LINK( AddCommandHdl, Button *, void ); DECL_LINK( AddCommandHdl, Button *, void );
//DECL_LINK( RemoveCommandHdl, Button *, void ); DECL_LINK( RemoveCommandHdl, Button *, void );
void UpdateButtonStates() override; void UpdateButtonStates() override;
short QueryReset() override; short QueryReset() override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment