]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/app.mm
Implement the hashmap for NSMenu
[wxWidgets.git] / src / cocoa / app.mm
index fe12b0f00e008c52d2b010703fc1c749f8acd61f..a71826f9e6a1b7ecf7c3fccdaef3dbdf63683a7c 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "wx/cocoa/ObjcPose.h"
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/mbarman.h"
 
 #if wxUSE_WX_RESOURCES
 #  include "wx/resource.h"
@@ -63,6 +64,8 @@ wxPoseAsInitializer *wxPoseAsInitializer::sm_first = NULL;
 - (void)doIdle: (id)data
 {
     wxASSERT(wxTheApp);
+    wxASSERT(wxMenuBarManager::GetInstance());
+    wxMenuBarManager::GetInstance()->CocoaInternalIdle();
     wxLogDebug("doIdle called");
 #ifdef __WXDEBUG__
     if(wxTheApp->IsInAssert())
@@ -168,6 +171,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 void wxApp::CleanUp()
 {
     wxDC::CocoaShutdownTextSystem();
+    wxMenuBarManager::DestroyInstance();
 
     wxAppBase::CleanUp();
 }
@@ -220,6 +224,9 @@ bool wxApp::OnInitGui()
 
     // Create the app using the sharedApplication method
     m_cocoaApp = [NSApplication sharedApplication];
+
+    wxMenuBarManager::CreateInstance();
+
     wxDC::CocoaInitializeTextSystem();
 //    [ m_cocoaApp setDelegate:m_cocoaApp ];
     #if 0