https://stackoverflow.com/questions/26305322/shellexecute-fails-for-local-html-or-file-urls
pretty much describes our problem: `ShellExecute(..., "open", ...)` does not
handle URL anchors properly.
I just tested dropping the Windows specific code for opening a browser and just
used the non-Windows code and it's working perfectly fine for all cases I
tested (Pref dialog links, About dialog link, Help menu item links, Build->Run
command with "builtin") and all worked.
So I'm wondering to just use the non-Windows code.
The only "problem" is the browser default. We set it to "firefox" which usually
works on Linux but not on Windows (except the user adds firefox.exe to $PATH).
Fortunately, we can read the system default browser with GIO:
```c
GAppInfo *ai1 = g_app_info_get_default_for_uri_scheme("http");
g_app_info_get_commandline(ai1)
```
this worked on my Windows box and the returned command could be opened as is.
So, a possible solution could be to drop the Windows specific code for opening
the browser and use GIO to try to read the default browser if it is not set
(and leave it unset if unset).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2405#issuecomment-559265994