From 4d8d25e8bca07d9b88acf0fb119522b0b80107b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 24 Nov 2014 13:45:02 +0000 Subject: [PATCH] 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/trunk@78171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/cmdline.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index ce9655685b..6d452e19a1 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -843,9 +843,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; }