From 98f26c5e5290103d30bd7395e81f793e4ff09b3d Mon Sep 17 00:00:00 2001

From: Alyssa Rosenzweig alyssa@rosenzweig.io

Date: Sun, 1 Nov 2020 20:21:56 -0500

Subject: [PATCH 1/1] Fix opening of mailto: links

This code path is used for opening both http/s and mailto links. On

macOS, open is used generically handling both nicely. On Linux,

x-www-browser was used for both, meaning it would attempt to open mailto

links with the browser. This -does- work but is clunky. On my system, my

defaults are Firefox for web and mutt for email, so if I clicked a

mailto, Firefox would open (slow!) just to go out of focus as it opens

mutt.

Let's just mirror the macOS behaviour and use xdg-open for both kinds of

links. Then the browser will be used for http/s and the mail client for

mailto and everyone's happy.

Signed-off-by: Alyssa Rosenzweig alyssa@rosenzweig.io


src/app.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app.c b/src/app.c

index a6632811..c2d5b732 100644

--- a/src/app.c

+++ b/src/app.c

@@ -1222,7 +1222,7 @@ void openInDefaultBrowser_App(const iString *url) {

#if defined (iPlatformApple)

                      iClob(newStringsCStr_StringList("/usr/bin/open", cstr_String(url), NULL))

#elif defined (iPlatformLinux) || defined (iPlatformOther)

#elif defined (iPlatformMsys)

     iClob(newStringsCStr_StringList(

         concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"),

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/release/patch/98f26c5e5290103d30bd7395e81f793e4ff09b3d.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
28.896428 milliseconds
Gemini-to-HTML Time
0.626003 milliseconds

This content has been proxied by September (ba2dc).