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).
pull/1102/head
tomsci 2021-08-28 21:09:48 +01:00 committed by GitHub
parent 4bf9df2385
commit 8cfe1d4bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -1621,6 +1621,14 @@ std::vector<std::string> InitGui(int argc, char **argv) {
ssDelegate = [[SSApplicationDelegate alloc] init]; ssDelegate = [[SSApplicationDelegate alloc] init];
NSApplication.sharedApplication.delegate = ssDelegate; 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]; [NSBundle.mainBundle loadNibNamed:@"MainMenu" owner:nil topLevelObjects:nil];
NSArray *languages = NSLocale.preferredLanguages; NSArray *languages = NSLocale.preferredLanguages;