git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32851
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
else
EnableMenuCommand( NULL , kHICommandPreferences ) ;
}
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 ( 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 ) ;
DisableMenuCommand( NULL , kHICommandQuit ) ;
else
EnableMenuCommand( NULL , kHICommandQuit ) ;