[Github-comments] [geany/geany] Clicking Help in Preferences results in URI Not Found on Win7 (#1522)

Enrico Tröger notifications at xxxxx
Sun Jun 25 07:31:55 UTC 2017


Windows support is annoying :(.

@Lex On Windows, we always strip the `file://` prefix in https://github.com/geany/geany/blob/master/src/win32.c#L789.
This has been added to support the "builtin" Run command for HTML files, this wouldn't work otherwise. Maybe this just masks another bug in constructing the URI in the "builtin" Run command logic which is pretty much wrong for Windows.
However, I don't want to open three new issues two weeks before the release.

@codebrainz Even with a proper URI, it won't open from within Geany as we call `ShellExecute` and this function does not support anchors in the URL (anymore, reports on the net indicate that it worked in Windows XP).
The reason we use `ShellExecute("open", uri, ...)` on Windows is that it's the easiest way to open the system's default browser without any hassle. Well, except the hassle with anchors.

I see two ways to proceed here:
- quick'n'easy solution: in `win32_open_browser` simply strip off any anchors in the URL
- instead of unconditionally use `ShellExecute` on Windows, use the browser command configured in the preferences and maybe fallback to `ShellExecute` in case no browser is configured

I'd prefer the second solution as it seems more reasonable to me, fixes the anchor problem cleanly (already tested) and also would allow the user to choose another browser than the system's default one. Currently, the browser command setting in the preferences is completely ignored on Windows.

-- 
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/1522#issuecomment-310887801
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170625/651830a4/attachment.html>


More information about the Github-comments mailing list