diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-17 07:48:40 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-17 07:48:56 +0300 |
commit | a0f5bccc709866521fefeb34d6b97cafdbec6fad (patch) | |
tree | fefbc4c6cfec66bd84b85ede26a28eb1622a6940 /src/app.c | |
parent | 115602cf34dfb2f151846673468a41f16712eb49 (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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 | } |