From 17085c3072deaf6a44246d6d4be1d7022e0f09cd Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 20 May 2021 10:21:44 +0100 Subject: use toggle instead of click for RadioButton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib256324f9d14cc2473e62ec4ffe0a18431e2c9cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115861 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- cui/source/dialogs/hlinettp.cxx | 10 ++++++---- cui/source/inc/hlinettp.hxx | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'cui/source') diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 5ee2aa70f90f..21762ec0c5e1 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -67,9 +67,9 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, m_xRbtLinktypInternet->set_active(true); // set handlers - Link aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) ); - m_xRbtLinktypInternet->connect_clicked( aLink ); - m_xRbtLinktypFTP->connect_clicked( aLink ); + Link aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) ); + m_xRbtLinktypInternet->connect_toggled( aLink ); + m_xRbtLinktypFTP->connect_toggled( aLink ); m_xCbAnonymous->connect_toggled( LINK ( this, SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl ) ); m_xEdLogin->connect_changed( LINK ( this, SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl ) ); m_xCbbTarget->connect_focus_out( LINK ( this, SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl ) ); @@ -314,8 +314,10 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const |* Click on Radiobutton : Internet or FTP |* |************************************************************************/ -IMPL_LINK_NOARG(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::Button&, void) +IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::ToggleButton&, rButton, void) { + if (!rButton.get_active()) + return; OUString aScheme = GetSchemeFromButtons(); SetScheme(aScheme); } diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index ae09e8ac874f..f930bc971411 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -45,7 +45,7 @@ private: std::unique_ptr m_xEdPassword; std::unique_ptr m_xCbAnonymous; - DECL_LINK( Click_SmartProtocol_Impl, weld::Button&, void ); ///< Radiobutton clicked: Type HTTP or FTP + DECL_LINK( Click_SmartProtocol_Impl, weld::ToggleButton&, void ); ///< Radiobutton toggled: Type HTTP or FTP DECL_LINK( ClickAnonymousHdl_Impl, weld::ToggleButton&, void ); ///< Checkbox : Anonymous User DECL_LINK( ModifiedLoginHdl_Impl, weld::Entry&, void ); ///< Contents of editfield "Login" modified DECL_LINK( LostFocusTargetHdl_Impl, weld::Widget&, void ); ///< Combobox "Target" lost its focus -- cgit v1.2.3