]> git.saurik.com Git - wxWidgets.git/commitdiff
Quit application menu item needs special handling like the Preferences item. [ patch...
authorKevin Hock <hockkn@yahoo.com>
Wed, 16 Mar 2005 05:16:55 +0000 (05:16 +0000)
committerKevin Hock <hockkn@yahoo.com>
Wed, 16 Mar 2005 05:16:55 +0000 (05:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/menu.cpp

index 91e347124309d4921facbf5ef90fdcdb8a4414b4..4a88133f5ddeed98734f19809a110b2569283469 100644 (file)
@@ -675,6 +675,14 @@ void wxMenuBar::MacInstallMenuBar()
         else
             EnableMenuCommand( NULL , kHICommandPreferences ) ;
     }
+    if ( UMAGetSystemVersion() >= 0x1000 && wxApp::s_macExitMenuItemId)
+    {
+        wxMenuItem *item = FindItem( wxApp::s_macExitMenuItemId , NULL ) ;
+        if ( item == NULL || !(item->IsEnabled()) )
+            DisableMenuCommand( NULL , kHICommandQuit ) ;
+        else
+            EnableMenuCommand( NULL , kHICommandQuit ) ;
+    }
 #endif
        wxMenuList::compatibility_iterator menuIter = m_menus.GetFirst();
        //