fix handling of native toolkit command line options broken by wxCmdLineArgsArray change

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-03-10 19:40:21 +00:00
parent f59be7c6bc
commit 4f6b94a33a
3 changed files with 8 additions and 5 deletions

View File

@ -167,16 +167,12 @@ wxAppConsoleBase::~wxAppConsoleBase()
// initilization/cleanup
// ----------------------------------------------------------------------------
bool wxAppConsoleBase::Initialize(int& argcOrig, wxChar **argvOrig)
bool wxAppConsoleBase::Initialize(int& WXUNUSED(argc), wxChar **WXUNUSED(argv))
{
#if wxUSE_INTL
GetTraits()->SetLocale();
#endif // wxUSE_INTL
// remember the command line arguments
argc = argcOrig;
argv = argvOrig;
#if wxUSE_THREADS
wxPendingEventsLocker = new wxCriticalSection;
#endif

View File

@ -298,6 +298,12 @@ bool wxEntryStart(int& argc, wxChar **argv)
return false;
}
// remember, possibly modified (e.g. due to removal of toolkit-specific
// parameters), command line arguments in member variables
app->argc = argc;
app->argv = argv;
wxCallAppCleanup callAppCleanup(app.get());
// for compatibility call the old initialization function too

View File

@ -437,6 +437,7 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
}
argc_ = argcGTK;
argv_[argc_] = NULL;
}
//else: gtk_init() didn't modify our parameters