diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-25 09:58:49 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-25 12:08:24 +0100 |
commit | 8b50a615cbf6c09ed9cf6af6336e388cd32db28e (patch) | |
tree | e654ee90beb8259c216e16f221e952f1d00ab948 /cui/source/dialogs | |
parent | 947b23c20780ede6b4d588fb9b944f572e9f8bc8 (diff) |
tdf#158357: UI simplify Hyperlink dialog by removing Hyperlink type radiobutton
+ rename "Hyperlink Type" into "Hyperlink Settings"
+ remove "Protocol" since ther's only 1 now
Change-Id: I9435606c6ac6eca87afc4c259fb1121f65638c0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159947
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 21cf34b3c7b6..c74d6ae10699 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -36,7 +36,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, : SvxHyperlinkTabPageBase(pParent, pDlg, "cui/ui/hyperlinkinternetpage.ui", "HyperlinkInternetPage", pItemSet) , m_bMarkWndOpen(false) - , m_xRbtLinktypInternet(xBuilder->weld_radio_button("linktyp_internet")) , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target"))) , m_xFtTarget(xBuilder->weld_label("target_label")) { @@ -56,12 +55,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, SetExchangeSupport (); - // set defaults - m_xRbtLinktypInternet->set_active(true); - // set handlers - Link<weld::Toggleable&, void> aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) ); - m_xRbtLinktypInternet->connect_toggled( aLink ); m_xCbbTarget->connect_focus_out( LINK ( this, SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl ) ); m_xCbbTarget->connect_changed( LINK ( this, SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl ) ); maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); @@ -167,12 +161,6 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, void) void SvxHyperlinkInternetTp::SetScheme(std::u16string_view rScheme) { - //if rScheme is empty or unknown the default behaviour is like it where HTTP - bool bInternet = true; - - //update protocol button selection: - m_xRbtLinktypInternet->set_active(bInternet); - //update target: RemoveImproperProtocol(rScheme); m_xCbbTarget->SetSmartProtocol( GetSmartProtocolFromButtons() ); @@ -223,19 +211,6 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() /************************************************************************* |* -|* Click on Radiobutton : WWW or ... -|* -|************************************************************************/ -IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::Toggleable&, rButton, void) -{ - if (!rButton.get_active()) - return; - OUString aScheme = GetSchemeFromButtons(); - SetScheme(aScheme); -} - -/************************************************************************* -|* |* Combobox Target lost the focus |* |************************************************************************/ @@ -246,7 +221,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl, weld::Widget&, void SvxHyperlinkInternetTp::RefreshMarkWindow() { - if (m_xRbtLinktypInternet->get_active() && IsMarkWndVisible()) + if (IsMarkWndVisible()) { weld::WaitObject aWait(mpDialog->getDialog()); OUString aStrURL( CreateAbsoluteURL() ); |