<p>This is an improved version of PR <a href="https://github.com/geany/geany/pull/637" class="issue-link" title='Fix for "Open in New Window".'>#637</a>.</p>
<p>No more "--" - not needed.<br>
No guard for is_osx_bundle() under Windows - does not belong here.<br>
Split into proper sequential commits.<br>
Fixed the encoding of options and doc_name.<br>
Fixed the OSX bundle executable name.<br>
Created a function to return the reproduced arguments instead of exposing global variables.<br>
Re-tested under Windows and Linux.</p>
<p>There is only one problem left. As described in PR <a href="https://github.com/geany/geany/pull/637" class="issue-link" title='Fix for "Open in New Window".'>#637</a>, under Windows, mscvrt often breaks unquoted locale strings on 2+ pieces, considering some characters "spaces". So spawn should quote any argv elements containing locale. But that must obviously be a separate PR.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/geany/geany/pull/653'>https://github.com/geany/geany/pull/653</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Add reverse option parser to main</li>
<li>Add support for geany executable to utils_resource_dir()</li>
<li>Improve New Window: pass the proper arguments and save configuration</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/geany/geany/pull/653/files#diff-0">src/libmain.c</a>
(121)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/geany/geany/pull/653/files#diff-1">src/main.h</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/geany/geany/pull/653/files#diff-2">src/plugins.c</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/geany/geany/pull/653/files#diff-3">src/utils.c</a>
(111)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/geany/geany/pull/653/files#diff-4">src/utils.h</a>
(17)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/geany/geany/pull/653.patch'>https://github.com/geany/geany/pull/653.patch</a></li>
<li><a href='https://github.com/geany/geany/pull/653.diff'>https://github.com/geany/geany/pull/653.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/653">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxFyP7z1mIBNH6qLc-WylTm1wQJSks5owb-mgaJpZM4F7Ng5.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/pull/653"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>