From 8cfe1d4bd7feec1e9d4159bbbf2f30324d3826d8 Mon Sep 17 00:00:00 2001 From: tomsci Date: Sat, 28 Aug 2021 21:09:48 +0100 Subject: [PATCH] mac: Remove spurious view menu items (#1101) Which are either not applicable for SolveSpace (the tabs ones) or are already handled in the platform-independent code (the fullscreen item). --- src/platform/guimac.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/platform/guimac.mm b/src/platform/guimac.mm index 530e040..67d1eb9 100644 --- a/src/platform/guimac.mm +++ b/src/platform/guimac.mm @@ -1621,6 +1621,14 @@ std::vector InitGui(int argc, char **argv) { ssDelegate = [[SSApplicationDelegate alloc] init]; NSApplication.sharedApplication.delegate = ssDelegate; + // Setting this prevents "Show Tab Bar" and "Show All Tabs" items from being + // automagically added to the View menu + NSWindow.allowsAutomaticWindowTabbing = NO; + + // And this prevents the duplicate "Enter Full Screen" menu item, see + // https://stackoverflow.com/questions/52154977/how-to-get-rid-of-enter-full-screen-menu-item + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"]; + [NSBundle.mainBundle loadNibNamed:@"MainMenu" owner:nil topLevelObjects:nil]; NSArray *languages = NSLocale.preferredLanguages;