git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64079
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (event.GetSetEnabled())
Enable(id, event.GetEnabled());
}
if (event.GetSetEnabled())
Enable(id, event.GetEnabled());
}
+ else
+ {
+#if wxOSX_USE_CARBON
+ // these two items are also managed by the Carbon Menu Manager, therefore we must
+ // always reset them ourselves
+ UInt32 cmd = 0;
+
+ if ( id == wxApp::s_macExitMenuItemId )
+ {
+ cmd = kHICommandQuit;
+ }
+ else if (id == wxApp::s_macPreferencesMenuItemId )
+ {
+ cmd = kHICommandPreferences;
+ }
+
+ if ( cmd != 0 )
+ {
+ if ( !item->IsEnabled() || wxDialog::OSXHasModalDialogsOpen() )
+ DisableMenuCommand( NULL , cmd ) ;
+ else
+ EnableMenuCommand( NULL , cmd ) ;
+
+ }
+#endif
+ }
+
return ;
m_rootMenu->GetPeer()->MakeRoot();
return ;
m_rootMenu->GetPeer()->MakeRoot();
- // DisableMenuCommand( NULL , kHICommandPreferences ) ;
#if 0
MenuBarHandle menubar = NULL ;
#if 0
MenuBarHandle menubar = NULL ;