diff options
Diffstat (limited to 'src/macos.m')
-rw-r--r-- | src/macos.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/macos.m b/src/macos.m index 28ebcc43..24a6fecb 100644 --- a/src/macos.m +++ b/src/macos.m | |||
@@ -491,6 +491,15 @@ void setupApplication_MacOS(void) { | |||
491 | windowCloseItem.action = @selector(closeTab); | 491 | windowCloseItem.action = @selector(closeTab); |
492 | } | 492 | } |
493 | 493 | ||
494 | void enableMenu_MacOS(const char *menuLabel, iBool enable) { | ||
495 | NSApplication *app = [NSApplication sharedApplication]; | ||
496 | NSMenu *appMenu = [app mainMenu]; | ||
497 | NSString *label = [NSString stringWithUTF8String:menuLabel]; | ||
498 | NSMenuItem *menuItem = [appMenu itemAtIndex:[appMenu indexOfItemWithTitle:label]]; | ||
499 | [menuItem setEnabled:enable]; | ||
500 | [label release]; | ||
501 | } | ||
502 | |||
494 | void insertMenuItems_MacOS(const char *menuLabel, int atIndex, const iMenuItem *items, size_t count) { | 503 | void insertMenuItems_MacOS(const char *menuLabel, int atIndex, const iMenuItem *items, size_t count) { |
495 | NSApplication *app = [NSApplication sharedApplication]; | 504 | NSApplication *app = [NSApplication sharedApplication]; |
496 | MyDelegate *myDel = (MyDelegate *) app.delegate; | 505 | MyDelegate *myDel = (MyDelegate *) app.delegate; |