summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-27 16:17:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-10-29 14:14:04 +0100
commit07bde58988705ca45a619eb7a4e670a5d951abf6 (patch)
treeb3e76af23a024d7549d31b5df0642a79b769028d /cui
parent09e3d45cdc5c739e5246388a83ccfc6d76bf66e9 (diff)
use activate-link instead of clicked
so we can return true to consume the event and not continue to the default url dispatch handler Change-Id: I66400363a57d528a25d68a7f9314a8bc7d95876e Reviewed-on: https://gerrit.libreoffice.org/81555 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/tipofthedaydlg.cxx7
-rw-r--r--cui/source/inc/tipofthedaydlg.hxx2
2 files changed, 5 insertions, 4 deletions
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx
index 8f82f6841293..25722420ddfc 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -103,7 +103,7 @@ void TipOfTheDayDialog::UpdateTip()
m_pLink->set_label(CuiResId(STR_MORE_LINK));
m_pLink->set_visible(true);
- m_pLink->connect_clicked(Link<weld::LinkButton&, void>());
+ m_pLink->connect_activate_link(Link<weld::LinkButton&, bool>());
}
else
{
@@ -111,7 +111,7 @@ void TipOfTheDayDialog::UpdateTip()
m_pLink->set_label(CuiResId(STR_HELP_LINK));
m_pLink->set_visible(true);
//converts aLink into the proper offline/online hyperlink
- m_pLink->connect_clicked(LINK(this, TipOfTheDayDialog, OnLinkClick));
+ m_pLink->connect_activate_link(LINK(this, TipOfTheDayDialog, OnLinkClick));
}
// image
OUString aURL("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/tipoftheday/");
@@ -132,9 +132,10 @@ void TipOfTheDayDialog::UpdateTip()
}
}
-IMPL_LINK_NOARG(TipOfTheDayDialog, OnLinkClick, weld::LinkButton&, void)
+IMPL_LINK_NOARG(TipOfTheDayDialog, OnLinkClick, weld::LinkButton&, bool)
{
Application::GetHelp()->Start(aLink, static_cast<weld::Widget*>(nullptr));
+ return true;
}
IMPL_LINK_NOARG(TipOfTheDayDialog, OnNextClick, weld::Button&, void)
diff --git a/cui/source/inc/tipofthedaydlg.hxx b/cui/source/inc/tipofthedaydlg.hxx
index d013665a4055..425805af6fad 100644
--- a/cui/source/inc/tipofthedaydlg.hxx
+++ b/cui/source/inc/tipofthedaydlg.hxx
@@ -36,7 +36,7 @@ private:
OUString aLink;
void UpdateTip();
DECL_LINK(OnNextClick, weld::Button&, void);
- DECL_LINK(OnLinkClick, weld::LinkButton&, void);
+ DECL_LINK(OnLinkClick, weld::LinkButton&, bool);
public:
TipOfTheDayDialog(weld::Window* pWindow);