diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index 4a88133f5d..4761918b33 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -675,10 +675,14 @@ void wxMenuBar::MacInstallMenuBar() else EnableMenuCommand( NULL , kHICommandPreferences ) ; } + // Unlike preferences which may or may not exist, the Quit item should be always + // enabled unless it is added by the application and then disabled, otherwise + // a program would be required to add an item with wxID_EXIT in order to get the + // Quit menu item to be enabled, which seems a bit burdensome. if ( UMAGetSystemVersion() >= 0x1000 && wxApp::s_macExitMenuItemId) { wxMenuItem *item = FindItem( wxApp::s_macExitMenuItemId , NULL ) ; - if ( item == NULL || !(item->IsEnabled()) ) + if ( item != NULL && !(item->IsEnabled()) ) DisableMenuCommand( NULL , kHICommandQuit ) ; else EnableMenuCommand( NULL , kHICommandQuit ) ;