X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/906c935a80b10d53cecf57f71ab5f3f4f1d529ec..f86a4930f2c69058684496a1882343fe8e709bf2:/src/osx/cocoa/menuitem.mm diff --git a/src/osx/cocoa/menuitem.mm b/src/osx/cocoa/menuitem.mm index 543b64f321..05179eca9e 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 ; @@ -305,6 +311,10 @@ bool wxMenuItemCocoaImpl::DoDefault() [theNSApplication unhideAllApplications:nil]; handled=true; } + else if (menuid == wxApp::s_macExitMenuItemId) + { + wxTheApp->ExitMainLoop(); + } return handled; }