From 9b9b96b88b688c87801e7a90f2e9df7fa7929916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 24 Nov 2014 13:45:21 +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/branches/WX_3_0_BRANCH@78172 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 1362a65773..02727ed1c9 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -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; }