wiring OnInit on osx to a later point in event processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -473,6 +473,9 @@ int wxEntryReal(int& argc, wxChar **argv)
|
|||||||
|
|
||||||
wxTRY
|
wxTRY
|
||||||
{
|
{
|
||||||
|
#if defined(__WXOSX__) && wxOSX_USE_COCOA_OR_IPHONE
|
||||||
|
// everything done in OnRun using native callbacks
|
||||||
|
#else
|
||||||
// app initialization
|
// app initialization
|
||||||
if ( !wxTheApp->CallOnInit() )
|
if ( !wxTheApp->CallOnInit() )
|
||||||
{
|
{
|
||||||
@@ -488,7 +491,7 @@ int wxEntryReal(int& argc, wxChar **argv)
|
|||||||
} callOnExit;
|
} callOnExit;
|
||||||
|
|
||||||
WX_SUPPRESS_UNUSED_WARN(callOnExit);
|
WX_SUPPRESS_UNUSED_WARN(callOnExit);
|
||||||
|
#endif
|
||||||
// app execution
|
// app execution
|
||||||
return wxTheApp->OnRun();
|
return wxTheApp->OnRun();
|
||||||
}
|
}
|
||||||
|
@@ -401,13 +401,15 @@ void wxApp::MacReopenApp()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||||
void wxApp::OSXOnWillFinishLaunching()
|
void wxApp::OSXOnWillFinishLaunching()
|
||||||
{
|
{
|
||||||
|
wxTheApp->OnInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::OSXOnDidFinishLaunching()
|
void wxApp::OSXOnDidFinishLaunching()
|
||||||
{
|
{
|
||||||
|
wxTheApp->OnLaunched();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::OSXOnWillTerminate()
|
void wxApp::OSXOnWillTerminate()
|
||||||
@@ -415,6 +417,8 @@ void wxApp::OSXOnWillTerminate()
|
|||||||
wxCloseEvent event;
|
wxCloseEvent event;
|
||||||
event.SetCanVeto(false);
|
event.SetCanVeto(false);
|
||||||
wxTheApp->OnEndSession(event);
|
wxTheApp->OnEndSession(event);
|
||||||
|
|
||||||
|
wxTheApp->OnExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxApp::OSXOnShouldTerminate()
|
bool wxApp::OSXOnShouldTerminate()
|
||||||
@@ -423,6 +427,7 @@ bool wxApp::OSXOnShouldTerminate()
|
|||||||
wxTheApp->OnQueryEndSession(event);
|
wxTheApp->OnQueryEndSession(event);
|
||||||
return !event.GetVeto();
|
return !event.GetVeto();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Macintosh CommandID support - converting between native and wx IDs
|
// Macintosh CommandID support - converting between native and wx IDs
|
||||||
|
Reference in New Issue
Block a user