<blockquote>
<p>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.</p>
</blockquote>
<p>Probably before, but since GTK+ 2.14 I think the simplest and most robust way should be <a href="https://developer.gnome.org/gtk3/stable/gtk3-Filesystem-utilities.html#gtk-show-uri"><code>gtk_show_uri()</code></a> (or the misdocumented <code>_on_window()</code> variant for newer GTK+).</p>
<blockquote>
<p>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</p>
</blockquote>
<p>+1, though I'd fallback on <code>gtk_show_uri()</code> if it works OK on Windows (and <em>then</em> maybe fall back to <code>ShellExecute()</code> or even <code>iexplore</code> or whatever). Also, it should fallback if either the browser isn't configured or if the configured application fails to launch, for example if Firefox isn't installed, as <a href="https://github.com/elextr" class="user-mention">@elextr</a> mentioned.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1522#issuecomment-310924633">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ14LxR-1eb5gUqtwMVBPsDvWxuGZks5sHrx-gaJpZM4ODKDO">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ-M2nRCjrJjLRmzWI7-kcsRg9l8Pks5sHrx-gaJpZM4ODKDO.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1522#issuecomment-310924633"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@codebrainz in #1522: \u003e 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.\r\n\r\nProbably before, but since GTK+ 2.14 I think the simplest and most robust way should be [`gtk_show_uri()`](https://developer.gnome.org/gtk3/stable/gtk3-Filesystem-utilities.html#gtk-show-uri) (or the misdocumented `_on_window()` variant for newer GTK+).\r\n\r\n\u003e 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\r\n\r\n+1, though I'd fallback on `gtk_show_uri()` if it works OK on Windows (and _then_ maybe fall back to `ShellExecute()` or even `iexplore` or whatever). Also, it should fallback if either the browser isn't configured or if the configured application fails to launch, for example if Firefox isn't installed, as @elextr mentioned.\r\n"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1522#issuecomment-310924633"}}}</script>