summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-17 07:48:40 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-17 07:48:56 +0300
commita0f5bccc709866521fefeb34d6b97cafdbec6fad (patch)
treefefbc4c6cfec66bd84b85ede26a28eb1622a6940 /src/app.c
parent115602cf34dfb2f151846673468a41f16712eb49 (diff)
Recognize and visualize "mailto:" links
"mailto:" links now have their own icon and when clicked they open the URL in the default web browser. IssueID #5
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app.c b/src/app.c
index 42244c80..c6b9a548 100644
--- a/src/app.c
+++ b/src/app.c
@@ -787,8 +787,9 @@ iBool handleCommand_App(const char *cmd) {
787 const iString *url = collectNewCStr_String(suffixPtr_Command(cmd, "url")); 787 const iString *url = collectNewCStr_String(suffixPtr_Command(cmd, "url"));
788 iUrl parts; 788 iUrl parts;
789 init_Url(&parts, url); 789 init_Url(&parts, url);
790 if (isEmpty_String(&d->httpProxy) && 790 if (equalCase_Rangecc(parts.scheme, "mailto") ||
791 (equalCase_Rangecc(parts.scheme, "http") || equalCase_Rangecc(parts.scheme, "https"))) { 791 (isEmpty_String(&d->httpProxy) && (equalCase_Rangecc(parts.scheme, "http") ||
792 equalCase_Rangecc(parts.scheme, "https")))) {
792 openInDefaultBrowser_App(url); 793 openInDefaultBrowser_App(url);
793 return iTrue; 794 return iTrue;
794 } 795 }