cui/source/customize/cfg.cxx |    4 ++--
 cui/source/inc/cfg.hxx       |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit abe8d06682c68c85f750d05409322a5eabc84158
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Sep 23 13:26:08 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Sep 23 16:16:43 2022 +0200

    Related: tdf#35030 hide the "reset" button more reliably
    
    otherwise it won't end up hidden if the "keyboard" tab page is the initial
    page, this handler only happens when the user switches tabs.
    
    use the newly added virtual methods to manage this instead
    
    Change-Id: I3eef6b4d7d453a5ec16ec62b2ebb558bd4757caa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140489
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f5ed658512e9..9baf31e61065 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -214,7 +214,6 @@ 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 );
 
@@ -229,8 +228,9 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, 
const SfxItemSet* pInSe
     }
 }
 
-IMPL_LINK(SvxConfigDialog, ActivatePageHdl, const OString&, rPage, void)
+void SvxConfigDialog::ActivatePage(const OString& rPage)
 {
+    SfxTabDialogController::ActivatePage(rPage);
     GetResetButton()->set_visible(rPage != "keyboard");
 }
 
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index bde738e17c82..ee97f6ec0edc 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -67,7 +67,9 @@ class SvxConfigDialog : public SfxTabDialogController
 {
 private:
     css::uno::Reference< css::frame::XFrame > m_xFrame;
-    DECL_LINK(ActivatePageHdl, const OString&, void);
+
+    virtual void ActivatePage(const OString& rPage) override;
+
 public:
     SvxConfigDialog(weld::Window*, const SfxItemSet*);
 

Reply via email to