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:) },
- (id) initWithTitle:(NSString *)aString action:(SEL)aSelector keyEquivalent:(NSString *)charCode
{
- [super initWithTitle:aString action:aSelector keyEquivalent:charCode];
- return self;
+ self = [super initWithTitle:aString action:aSelector keyEquivalent:charCode];
+ return self;
}
- (void) clickedAction: (id) sender
if (entry->GetFlags() & wxACCEL_CTRL)
modifiers |= NSCommandKeyMask;
+ if (entry->GetFlags() & wxACCEL_RAW_CTRL)
+ modifiers |= NSControlKeyMask;
+
if (entry->GetFlags() & wxACCEL_ALT)
modifiers |= NSAlternateKeyMask ;
[theNSApplication unhideAllApplications:nil];
handled=true;
}
+ else if (menuid == wxApp::s_macExitMenuItemId)
+ {
+ wxTheApp->ExitMainLoop();
+ }
return handled;
}
wxCFStringRef cfText(text);
SEL selector = nil;
bool targetSelf = false;
- if ( ! pParentMenu->GetNoEventsMode() && pSubMenu == NULL )
+ if ( (pParentMenu == NULL || !pParentMenu->GetNoEventsMode()) && pSubMenu == NULL )
{
selector = wxOSXGetSelectorFromID(menuid);