]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/toplevel.mm
removed assert which became incorrect after last change
[wxWidgets.git] / src / cocoa / toplevel.mm
index 453ad124a36492674b46bf598604d5491fab5e50..de8ad026619aa6b25bb09ef6c6f2163530a8cf63 100644 (file)
@@ -134,6 +134,14 @@ wxTopLevelWindowCocoa::~wxTopLevelWindowCocoa()
 // wxTopLevelWindowCocoa Cocoa Specifics
 // ----------------------------------------------------------------------------
 
+wxMenuBar* wxTopLevelWindowCocoa::GetAppMenuBar(wxCocoaNSWindow *win)
+{
+    wxTopLevelWindowCocoa *parent = wxDynamicCast(GetParent(),wxTopLevelWindow);
+    if(parent)
+        return parent->GetAppMenuBar(win);
+    return NULL;
+}
+
 void wxTopLevelWindowCocoa::SetNSWindow(WX_NSWindow cocoaNSWindow)
 {
     bool need_debug = cocoaNSWindow || m_cocoaNSWindow;
@@ -159,7 +167,6 @@ void wxTopLevelWindowCocoa::CocoaReplaceView(WX_NSView oldView, WX_NSView newVie
 void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeKey(void)
 {
     wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeKey",this);
-    wxMenuBarManager::GetInstance()->WindowDidBecomeKey(this);
     wxActivateEvent event(wxEVT_ACTIVATE, TRUE, GetId());
     event.SetEventObject(this);
     GetEventHandler()->ProcessEvent(event);
@@ -171,19 +178,16 @@ void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignKey(void)
     wxActivateEvent event(wxEVT_ACTIVATE, FALSE, GetId());
     event.SetEventObject(this);
     GetEventHandler()->ProcessEvent(event);
-    wxMenuBarManager::GetInstance()->WindowDidResignKey(this);
 }
 
 void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeMain(void)
 {
     wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeMain",this);
-    wxMenuBarManager::GetInstance()->WindowDidBecomeMain(this);
 }
 
 void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignMain(void)
 {
     wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignMain",this);
-    wxMenuBarManager::GetInstance()->WindowDidResignMain(this);
 }
 
 void wxTopLevelWindowCocoa::CocoaDelegate_windowWillClose(void)