]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/app.cpp
find available samples, demos and contribs at runtime
[wxWidgets.git] / src / mac / app.cpp
index ebbb1498bef734f6546016c2febd2d9440c81084..39086ddeb8b5f9272e19be06009de2ea3072bcf2 100644 (file)
@@ -82,8 +82,6 @@ static EventTime sleepTime = kEventDurationNoWait ;
 static long sleepTime = 0 ;
 #endif
 
-wxApp *wxTheApp = NULL;
-
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
 BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
@@ -580,7 +578,7 @@ bool wxApp::OnInitGui()
 
     InstallApplicationEventHandler(
         GetwxAppEventHandlerUPP(),
-        GetEventTypeCount(eventList), eventList, wxTheApp, &((EventHandlerRef)wxTheApp->m_macEventHandler));
+        GetEventTypeCount(eventList), eventList, wxTheApp, (EventHandlerRef *)&(wxTheApp->m_macEventHandler));
 #endif
 
 #if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
@@ -1121,9 +1119,6 @@ pascal OSStatus wxMacApplicationEventHandler( EventHandlerCallRef handler , Even
 */
 #endif
 
-// Static member initialization
-wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL;
-
 wxApp::wxApp()
 {
   m_topWindow = NULL;
@@ -1222,9 +1217,11 @@ void wxApp::OnIdle(wxIdleEvent& event)
     wxMacProcessNotifierAndPendingEvents();
 
   s_inOnIdle = FALSE;
+  if(!wxMenuBar::MacGetInstalledMenuBar() && wxMenuBar::MacGetCommonMenuBar())
+    wxMenuBar::MacGetCommonMenuBar()->MacInstallMenuBar();
 }
 
-void wxWakeUpIdle()
+void wxApp::WakeUpIdle()
 {
     wxMacWakeUp() ;
 }
@@ -1287,10 +1284,8 @@ void wxApp::DeletePendingObjects()
   }
 }
 
-void wxExit()
+void wxApp::Exit()
 {
-    wxLogError(_("Fatal error: exiting"));
-
     wxApp::CleanUp();
     ::ExitToShell() ;
 }