summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-19 07:33:34 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-19 07:33:34 +0200
commitfacdf3ca44c170aec9466b7e309a209de0c7f643 (patch)
tree662f0ba2c86c618d9cb3954f6a36ac1005534ed3 /src/app.c
parentb6923950df99ba6c8ca1e7234440321901fe804c (diff)
Opening unrecognized schemes in default browser
This works if the OS supports the scheme as built-in or via some handler application. IssueID #103 IssueID #84
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app.c b/src/app.c
index ae21d078..12d4024d 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1195,7 +1195,7 @@ iBool handleCommand_App(const char *cmd) {
1195 const iBool noProxy = argLabel_Command(cmd, "noproxy"); 1195 const iBool noProxy = argLabel_Command(cmd, "noproxy");
1196 iUrl parts; 1196 iUrl parts;
1197 init_Url(&parts, url); 1197 init_Url(&parts, url);
1198 if (equalCase_Rangecc(parts.scheme, "mailto") || 1198 if (argLabel_Command(cmd, "default") || equalCase_Rangecc(parts.scheme, "mailto") ||
1199 ((noProxy || isEmpty_String(&d->prefs.httpProxy)) && 1199 ((noProxy || isEmpty_String(&d->prefs.httpProxy)) &&
1200 (equalCase_Rangecc(parts.scheme, "http") || 1200 (equalCase_Rangecc(parts.scheme, "http") ||
1201 equalCase_Rangecc(parts.scheme, "https")))) { 1201 equalCase_Rangecc(parts.scheme, "https")))) {
@@ -1205,7 +1205,7 @@ iBool handleCommand_App(const char *cmd) {
1205 iDocumentWidget *doc = document_Command(cmd); 1205 iDocumentWidget *doc = document_Command(cmd);
1206 const int newTab = argLabel_Command(cmd, "newtab"); 1206 const int newTab = argLabel_Command(cmd, "newtab");
1207 if (newTab) { 1207 if (newTab) {
1208 doc = newTab_App(NULL, (newTab & 1) != 0); /* newtab:2 to open in background */ 1208 doc = newTab_App(NULL, (newTab & 1) != 0); /* "newtab:2" to open in background */
1209 } 1209 }
1210 iHistory *history = history_DocumentWidget(doc); 1210 iHistory *history = history_DocumentWidget(doc);
1211 const iBool isHistory = argLabel_Command(cmd, "history") != 0; 1211 const iBool isHistory = argLabel_Command(cmd, "history") != 0;