]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/mbarman.mm
Use a lowercase 'q' for the Quit menu item's keyEquivalent.
[wxWidgets.git] / src / cocoa / mbarman.mm
index b2b916054d5b8d502a20357107665708c960901c..829bdffebbd6db8e751d122368856c52d39469ec 100644 (file)
@@ -71,7 +71,7 @@ wxMenuBarManager::wxMenuBarManager()
     [m_menuApp addItem: menuitem];
     [menuitem release];
 /**/[m_menuApp addItem: [NSMenuItem separatorItem]];
-/**/menuitem = [[NSMenuItem alloc] initWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@"Q"];
+/**/menuitem = [[NSMenuItem alloc] initWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@"q"];
     [menuitem setTarget: theNSApplication];
     [m_menuApp addItem: menuitem];
     [menuitem release];
@@ -161,21 +161,22 @@ void wxMenuBarManager::InstallMainMenu()
 
 void wxMenuBarManager::WindowDidBecomeKey(wxTopLevelWindowNative *win)
 {
-//    wxASSERT(!m_windowKey);
+    wxASSERT(!m_windowKey);
     m_windowKey = win;
     InstallMenuBarForWindow(win);
 }
 
-void wxMenuBarManager::WindowDidResignKey(wxTopLevelWindowNative *win)
+void wxMenuBarManager::WindowDidResignKey(wxTopLevelWindowNative *win, bool uninstallMenuBar)
 {
     wxASSERT(m_windowKey==win);
     m_windowKey = NULL;
-    SetMenuBar(NULL);
+    if(uninstallMenuBar)
+        SetMenuBar(NULL);
 }
 
 void wxMenuBarManager::WindowDidBecomeMain(wxTopLevelWindowNative *win)
 {
-//    wxASSERT(!m_windowMain);
+    wxASSERT(!m_windowMain);
     m_windowMain = win;
 }