cui/source/customize/cfg.cxx |    6 ++++++
 cui/source/inc/cfg.hxx       |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 2e8cbf38b760d2d5d76048542f15962b94acc03a
Author:     Heiko Tietze <[email protected]>
AuthorDate: Mon Mar 14 13:07:50 2022 +0100
Commit:     Heiko Tietze <[email protected]>
CommitDate: Wed Mar 16 07:04:06 2022 +0100

    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 <[email protected]>

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*);
 

Reply via email to