From 5c50beef4fca106a843e9370ed40e5ef9d60bac3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 10 Feb 2013 03:06:47 +0300 Subject: Add https support to link handlers. --- src/gui/helpwindow.cpp | 2 +- src/gui/updaterwindow.cpp | 2 +- src/gui/widgets/itemlinkhandler.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp index d93472211..c035b2a24 100644 --- a/src/gui/helpwindow.cpp +++ b/src/gui/helpwindow.cpp @@ -88,7 +88,7 @@ void HelpWindow::action(const gcn::ActionEvent &event) void HelpWindow::handleLink(const std::string &link, gcn::MouseEvent *event A_UNUSED) { - if (!strStartWith(link, "http://")) + if (!strStartWith(link, "http://") && !strStartWith(link, "https://")) { std::string helpFile = link; loadHelp(helpFile); diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp index f392a4b79..3c3dfac9e 100644 --- a/src/gui/updaterwindow.cpp +++ b/src/gui/updaterwindow.cpp @@ -847,6 +847,6 @@ bool UpdaterWindow::validateFile(const std::string &filePath, void UpdaterWindow::handleLink(const std::string &link, gcn::MouseEvent *event A_UNUSED) { - if (strStartWith(link, "http://")) + if (strStartWith(link, "http://") || strStartWith(link, "https://")) openBrowser(link); } diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index d9c7ca838..24b487f53 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -64,7 +64,7 @@ ItemLinkHandler::~ItemLinkHandler() void ItemLinkHandler::handleLink(const std::string &link, gcn::MouseEvent *event) { - if (!strStartWith(link, "http://")) + if (!strStartWith(link, "http://") && !strStartWith(link, "https://")) { if (!mItemPopup) return; -- cgit v1.2.3-70-g09d2