]> git.lyx.org Git - lyx.git/blobdiff - src/support/AppleSupport.m
Let paragraph::requestSpellcheck() consider contained insets
[lyx.git] / src / support / AppleSupport.m
index 4cac559249db137511756f21f0d742120f03d9f1..7657e9db974e722e2d042eafc795571d190b2c3c 100644 (file)
@@ -19,5 +19,26 @@ void appleCleanupEditMenu() {
 
        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledDictationMenuItem"];
        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledCharacterPaletteMenuItem"];
+}
+
+
+void appleCleanupViewMenu() {
+
+       // Remove the "Show Tab Bar" menu item from the "View" menu, if supported
+       // See the Apple developer release notes:
+       // What should an application which already has support for tabbing do?
+       // - The application should explicitly opt-out of automatic window tabbing...
+       // It should respect the userTabbingPreference... see below
+       // https://developer.apple.com/library/archive/releasenotes/AppKit/RN-AppKitOlderNotes/index.html
+       if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)])
+               [NSWindow setAllowsAutomaticWindowTabbing:NO];
+
+       // Remove the "Enter Full Screen" menu item from the "View" menu
+       [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
+}
+
 
+bool appleUserTabbingPreferenceAlways() {
+       return [NSWindow respondsToSelector:@selector(userTabbingPreference)] &&
+               [NSWindow userTabbingPreference] == NSWindowUserTabbingPreferenceAlways;
 }