X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a985b2c891cd7b925f01837323834aa6a9a8c23d..8a31648287be0ef976f133de2786b137f1e98340:/src/osx/cocoa/menuitem.mm?ds=sidebyside diff --git a/src/osx/cocoa/menuitem.mm b/src/osx/cocoa/menuitem.mm index 715517244a..0c6c930e32 100644 --- a/src/osx/cocoa/menuitem.mm +++ b/src/osx/cocoa/menuitem.mm @@ -33,8 +33,11 @@ struct Mapping Mapping sActionToWXMapping[] = { +// as we don't have NSUndoManager support we must not use the native actions +#if 0 { wxID_UNDO, @selector(undo:) }, { wxID_REDO, @selector(redo:) }, +#endif { wxID_CUT, @selector(cut:) }, { wxID_COPY, @selector(copy:) }, { wxID_PASTE, @selector(paste:) }, @@ -137,6 +140,9 @@ void wxMacCocoaMenuItemSetAccelerator( NSMenuItem* menuItem, wxAcceleratorEntry* if (entry->GetFlags() & wxACCEL_CTRL) modifiers |= NSCommandKeyMask; + if (entry->GetFlags() & wxACCEL_RAW_CTRL) + modifiers |= NSControlKeyMask; + if (entry->GetFlags() & wxACCEL_ALT) modifiers |= NSAlternateKeyMask ; @@ -328,7 +334,7 @@ wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, wxMenu *pParentMenu, wxCFStringRef cfText(text); SEL selector = nil; bool targetSelf = false; - if ( ! pParentMenu->GetNoEventsMode() && pSubMenu == NULL ) + if ( (pParentMenu == NULL || !pParentMenu->GetNoEventsMode()) && pSubMenu == NULL ) { selector = wxOSXGetSelectorFromID(menuid);