Skip Cocoa's options in wxCmdLineParser on OS X

Skip Cocoa-specific flags used by Xcode (such as -AppleLanguages) on OS
X when parsing the command line. They all take a single argument, so
skip both the flag and the following value in the argv list.

Also fix handling of -ApplePersistenceIgnoreState, which didn't skip the
value as it should.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2014-11-24 13:45:21 +00:00
parent 8f1792829e
commit 9b9b96b88b

View File

@@ -690,9 +690,13 @@ int wxCmdLineParser::Parse(bool showUsage)
continue;
}
#ifdef __WXOSX__
if ( arg == wxT("-ApplePersistenceIgnoreState") )
if ( arg == wxS("-ApplePersistenceIgnoreState") ||
arg == wxS("-AppleTextDirection") ||
arg == wxS("-AppleLocale") ||
arg == wxS("-AppleLanguages") )
{
maybeOption = false;
n++;
continue;
}