summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-11-25 09:58:49 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-11-25 12:08:24 +0100
commit8b50a615cbf6c09ed9cf6af6336e388cd32db28e (patch)
treee654ee90beb8259c216e16f221e952f1d00ab948 /cui
parent947b23c20780ede6b4d588fb9b944f572e9f8bc8 (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')
-rw-r--r--cui/source/dialogs/hlinettp.cxx27
-rw-r--r--cui/source/inc/hlinettp.hxx1
-rw-r--r--cui/uiconfig/ui/hyperlinkinternetpage.ui52
3 files changed, 2 insertions, 78 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() );
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index bb86dff9ca5e..ad308a401f45 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -36,7 +36,6 @@ class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase
private:
bool m_bMarkWndOpen;
- std::unique_ptr<weld::RadioButton> m_xRbtLinktypInternet;
std::unique_ptr<SvxHyperURLBox> m_xCbbTarget;
std::unique_ptr<weld::Label> m_xFtTarget;
diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui b/cui/uiconfig/ui/hyperlinkinternetpage.ui
index 6a6a191a6b91..0031207e8f51 100644
--- a/cui/uiconfig/ui/hyperlinkinternetpage.ui
+++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui
@@ -26,40 +26,6 @@
<property name="margin-start">12</property>
<property name="margin-top">6</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkRadioButton" id="linktyp_internet">
- <property name="label" translatable="yes" context="hyperlinkinternetpage|linktyp_internet">_Web</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="linktyp_internet-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="hyperlinkinternetpage|extended_tip|linktyp_internet">Creates an "http://" hyperlink.</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="target_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -130,21 +96,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="lbProtocol">
- <property name="name">lbProtocol</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="hyperlinkinternetpage|protocol_label">Proto_col:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">linktyp_internet</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
<placeholder/>
</child>
</object>
@@ -153,7 +104,7 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="hyperlinkinternetpage|label2">Hyperlink Type</property>
+ <property name="label" translatable="yes" context="hyperlinkinternetpage|label2">Hyperlink Settings</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -339,7 +290,6 @@
<widget name="frame_label"/>
<widget name="indication_label"/>
<widget name="name_label"/>
- <widget name="lbProtocol"/>
</widgets>
</object>
</interface>