[Libreoffice-commits] core.git: cui/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 20 12:23:49 UTC 2021
cui/source/dialogs/hlinettp.cxx | 10 ++++++----
cui/source/inc/hlinettp.hxx | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 17085c3072deaf6a44246d6d4be1d7022e0f09cd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 20 10:21:44 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 20 14:23:04 2021 +0200
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 at redhat.com>
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
More information about the Libreoffice-commits
mailing list