From f1b95ce0ff54d6a403ba07ad3dc899b638ffade2 Mon Sep 17 00:00:00 2001 From: jak1 Date: Sat, 18 Dec 2021 22:32:34 +0100 Subject: added ftp:// to url command also @@ftp:/foo.bar|baz@@ fixes #38 --- src/gui/widgets/itemlinkhandler.cpp | 3 ++- src/gui/windows/serverinfowindow.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 7be4287b5..bb5e3e29a 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -187,7 +187,8 @@ void ItemLinkHandler::handleLink(const std::string &link, if (link.empty()) return; - if (strStartWith(link, "http://") || strStartWith(link, "https://")) + if (strStartWith(link, "http://") || strStartWith(link, "https://") || + strStartWith(link, "ftp://")) { handleHttpLink(link, event); } diff --git a/src/gui/windows/serverinfowindow.cpp b/src/gui/windows/serverinfowindow.cpp index f571d29e1..51af4db5c 100644 --- a/src/gui/windows/serverinfowindow.cpp +++ b/src/gui/windows/serverinfowindow.cpp @@ -87,8 +87,8 @@ ServerInfoWindow::~ServerInfoWindow() void ServerInfoWindow::handleLink(const std::string &link, MouseEvent *const event A_UNUSED) { - if (strStartWith(link, "http://") || - strStartWith(link, "https://")) + if (strStartWith(link, "http://") || strStartWith(link, "https://") || + strStartWith(link, "ftp://")) { openBrowser(link); } -- cgit v1.2.3-70-g09d2