summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-20 10:21:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-20 14:23:04 +0200
commit17085c3072deaf6a44246d6d4be1d7022e0f09cd (patch)
treea838f5eae2e7e385f3e3446eb3319121b789f96a /cui/source
parent12bd5e0ae116c0f18c980f3b2ce515432545d0c4 (diff)
use toggle instead of click for RadioButton
Change-Id: Ib256324f9d14cc2473e62ec4ffe0a18431e2c9cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115861 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/hlinettp.cxx10
-rw-r--r--cui/source/inc/hlinettp.hxx2
2 files changed, 7 insertions, 5 deletions
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<weld::Button&, void> aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) );
- m_xRbtLinktypInternet->connect_clicked( aLink );
- m_xRbtLinktypFTP->connect_clicked( aLink );
+ Link<weld::ToggleButton&, void> 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<weld::Entry> m_xEdPassword;
std::unique_ptr<weld::CheckButton> 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