X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f66f6a5b3583b02c34854556eb83e3a808524ce..4706252347b3a729552753c07ea41cc9ba9cd19d:/src/osx/carbon/app.cpp diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index 80cc909f63..30fb4b076f 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -403,12 +403,13 @@ void wxApp::MacReopenApp() #if wxOSX_USE_COCOA_OR_IPHONE void wxApp::OSXOnWillFinishLaunching() { - wxTheApp->OnInit(); +#if wxOSX_USE_IPHONE + m_onInitResult = OnInit(); +#endif } void wxApp::OSXOnDidFinishLaunching() { - wxTheApp->OnLaunched(); } void wxApp::OSXOnWillTerminate() @@ -416,8 +417,6 @@ void wxApp::OSXOnWillTerminate() wxCloseEvent event; event.SetCanVeto(false); wxTheApp->OnEndSession(event); - - wxTheApp->OnExit(); } bool wxApp::OSXOnShouldTerminate() @@ -822,21 +821,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv) InstallDebugAssertOutputHandler( NewDebugAssertOutputHandlerUPP( wxMacAssertOutputHandler ) ); #endif - // Mac OS X passes a process serial number command line argument when - // the application is launched from the Finder. This argument must be - // removed from the command line arguments before being handled by the - // application (otherwise applications would need to handle it) - if ( argc > 1 ) - { - static const wxChar *ARG_PSN = wxT("-psn_"); - if ( wxStrncmp(argv[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 ) - { - // remove this argument - --argc; - memmove(argv + 1, argv + 2, argc * sizeof(wxChar*)); - } - } - /* Cocoa supports -Key value options which set the user defaults key "Key" to the value "value" Some of them are very handy for debugging like @@ -890,7 +874,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv) return true; } -#if wxOSX_USE_COCOA_OR_CARBON +#if wxOSX_USE_CARBON bool wxApp::CallOnInit() { wxMacAutoreleasePool autoreleasepool;