diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-28 07:55:21 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-28 07:55:21 +0300 |
commit | 9d66bec7f60a9767b7ec0acac747dbfecc87899c (patch) | |
tree | 8ee2c768f4db81a2bf877efa4992387f686f4d18 /src/macos.m | |
parent | ea7cc3847d1e4101478137779ecd43cca2218cd7 (diff) |
macOS: Recreate menus after language changes
IssueID #192
Diffstat (limited to 'src/macos.m')
-rw-r--r-- | src/macos.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/macos.m b/src/macos.m index 019533bd..0dcc3ef5 100644 --- a/src/macos.m +++ b/src/macos.m | |||
@@ -460,6 +460,12 @@ static void setShortcut_NSMenuItem_(NSMenuItem *item, int key, int kmods) { | |||
460 | delete_String(str); | 460 | delete_String(str); |
461 | } | 461 | } |
462 | 462 | ||
463 | void removeMenu_MacOS(int atIndex) { | ||
464 | NSApplication *app = [NSApplication sharedApplication]; | ||
465 | NSMenu *appMenu = [app mainMenu]; | ||
466 | [appMenu removeItemAtIndex:atIndex]; | ||
467 | } | ||
468 | |||
463 | void insertMenuItems_MacOS(const char *menuLabel, int atIndex, const iMenuItem *items, size_t count) { | 469 | void insertMenuItems_MacOS(const char *menuLabel, int atIndex, const iMenuItem *items, size_t count) { |
464 | NSApplication *app = [NSApplication sharedApplication]; | 470 | NSApplication *app = [NSApplication sharedApplication]; |
465 | MyDelegate *myDel = (MyDelegate *) app.delegate; | 471 | MyDelegate *myDel = (MyDelegate *) app.delegate; |