Fix the longstanding xib bug keeping me from editor preferences on mac

fix #496
This commit is contained in:
2025-05-17 09:53:44 -05:00
parent 99b0c9a227
commit 3bbb6b7d9d
3 changed files with 15 additions and 3 deletions

View File

@@ -137,8 +137,12 @@ void init_menubar() {
MenuHandler* handler = [[[MenuHandler alloc] init] retain];
setMenuCallback([apple_menu itemWithTitle: @"About Blades of Exile"], handler, @selector(menuChoice:), int(eMenu::ABOUT));
setMenuCallback([apple_menu itemWithTitle: @"Preferences…"], handler, @selector(menuChoice:), int(eMenu::PREFS));
setMenuCallback([apple_menu itemWithTitle: @"Quit Blades of Exile"], handler, @selector(menuChoice:), int(eMenu::QUIT));
// An inscrutable bug is making the apple menu not localize this element for some of the apps on some computers.
// Attaching the event to a nonexistent item should be harmless.
setMenuCallback([apple_menu itemWithTitle: @"Preferences…"], handler, @selector(menuChoice:), int(eMenu::PREFS));
setMenuCallback([apple_menu itemWithTitle: @"Settings…"], handler, @selector(menuChoice:), int(eMenu::PREFS));
int i = 0;
for(eMenu opt : file_choices)