wxUnusedVar(sender);
if ( impl )
{
- impl->GetWXPeer()->GetMenu()->HandleCommandProcess(impl->GetWXPeer());
+ wxMenuItem* menuitem = impl->GetWXPeer();
+ if ( menuitem->GetMenu()->HandleCommandProcess(menuitem) == false )
+ {
+ }
}
}
int key = entry->GetKeyCode() ;
if ( key )
{
- if (entry->GetFlags() & wxACCEL_CTRL);
+ if (entry->GetFlags() & wxACCEL_CTRL)
modifiers |= NSCommandKeyMask;
if (entry->GetFlags() & wxACCEL_ALT)
wxMacCocoaMenuItemSetAccelerator( m_osxMenuItem, entry );
}
+
+ bool DoDefault();
void * GetHMenuItem() { return m_osxMenuItem; }
[m_osxMenuItem release];
}
+bool wxMenuItemCocoaImpl::DoDefault()
+{
+ bool handled=false;
+ int menuid = m_peer->GetId();
+
+ NSApplication *theNSApplication = [NSApplication sharedApplication];
+ if (menuid == wxID_OSX_HIDE)
+ {
+ [theNSApplication hide:nil];
+ handled=true;
+ }
+ else if (menuid == wxID_OSX_HIDEOTHERS)
+ {
+ [theNSApplication hideOtherApplications:nil];
+ handled=true;
+ }
+ else if (menuid == wxID_OSX_SHOWALL)
+ {
+ [theNSApplication unhideAllApplications:nil];
+ handled=true;
+ }
+ return handled;
+}
wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, wxMenu *pParentMenu,
int WXUNUSED(id),