diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2017-08-20 20:43:56 +0300 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-09-04 22:39:47 +0200 |
commit | 46d993c352c2f34af532ffd9034ebf7bd3ab9691 (patch) | |
tree | b4e474200ed10a6a0dcc3d1e74b9cadb00585893 /cui/source/inc | |
parent | 7e0ecdecb1131bffd263d0e51583a25991b9a878 (diff) |
Implement "Reset" button in the Customize dialog
For now, it works for the Toolbar and the Context Menu tabs.
Normal top-level menus cannot be reset individually at the moment
because they are sharing a single xml file, and the removeSettings()
mathod doesn't provide per-item removal from within a single file.
Change-Id: I42d62dc26130e4c03cf75a1ce6dc9ff367a58d47
Reviewed-on: https://gerrit.libreoffice.org/41367
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui/source/inc')
-rw-r--r-- | cui/source/inc/SvxMenuConfigPage.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/SvxToolbarConfigPage.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/cui/source/inc/SvxMenuConfigPage.hxx b/cui/source/inc/SvxMenuConfigPage.hxx index a0ba3abd1cbe..56365d79aa93 100644 --- a/cui/source/inc/SvxMenuConfigPage.hxx +++ b/cui/source/inc/SvxMenuConfigPage.hxx @@ -60,6 +60,7 @@ private: DECL_LINK( RemoveCommandHdl, Button *, void ); DECL_LINK( InsertHdl, MenuButton *, void ); + DECL_LINK( ResetMenuHdl, Button *, void ); void Init() override; void UpdateButtonStates() override; diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx index 2f7e0e48331e..471d9bc0d6d3 100644 --- a/cui/source/inc/SvxToolbarConfigPage.hxx +++ b/cui/source/inc/SvxToolbarConfigPage.hxx @@ -61,6 +61,7 @@ private: DECL_LINK( RemoveCommandHdl, Button *, void ); DECL_LINK( InsertHdl, MenuButton *, void ); + DECL_LINK( ResetToolbarHdl, Button *, void ); void UpdateButtonStates() override; short QueryReset() override; diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 555dba9ee30b..bd9704d25420 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -241,6 +241,8 @@ public: bool HasURL( const OUString& rURL ) override; void Reset() override; bool Apply() override; + + void ResetContextMenu( SvxConfigEntry* pEntry ); }; class SvxConfigEntry @@ -404,6 +406,8 @@ protected: VclPtr<ListBox> m_pSaveInListBox; VclPtr<MenuButton> m_pInsertBtn; + // Used to reset the selected toolbar/menu/context menu + VclPtr<PushButton> m_pResetBtn; // Middle buttons VclPtr<PushButton> m_pAddCommandButton; |