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>
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 53e8b858..546d665 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 7adc9c0..a382a9c 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*);