diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2022-03-14 13:07:50 +0100 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2022-03-16 07:04:06 +0100 |
commit | 2e8cbf38b760d2d5d76048542f15962b94acc03a (patch) | |
tree | 37e4efb3718722861e1f0dd613225b5968035ed0 /cui | |
parent | bcede3c0ed94d413fea18d2457b916a9f5f4346a (diff) |
Resolves tdf#35030 - Hide Reset button for keyboard customization
Change-Id: Id69f2fd6ed5d33a622088886b25d1f61d7eb2516
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131534
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 6 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 53e8b8580a4c..546d66522140 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -213,6 +213,7 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe AddTabPage("contextmenus", CreateSvxContextMenuConfigPage, nullptr); AddTabPage("keyboard", CreateKeyboardConfigPage, nullptr); AddTabPage("events", CreateSvxEventConfigPage, nullptr); + m_xTabCtrl->connect_enter_page(LINK(this, SvxConfigDialog, ActivatePageHdl)); const SfxPoolItem* pItem = pInSet->GetItem( SID_CONFIG ); @@ -227,6 +228,11 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe } } +IMPL_LINK(SvxConfigDialog, ActivatePageHdl, const OString&, rPage, void) +{ + GetResetButton()->set_visible(rPage != "keyboard"); +} + void SvxConfigDialog::SetFrame(const css::uno::Reference<css::frame::XFrame>& xFrame) { m_xFrame = xFrame; diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 7adc9c026185..a382a9c103bf 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -67,7 +67,7 @@ class SvxConfigDialog : public SfxTabDialogController { private: css::uno::Reference< css::frame::XFrame > m_xFrame; - + DECL_LINK(ActivatePageHdl, const OString&, void); public: SvxConfigDialog(weld::Window*, const SfxItemSet*); |