2020-08-30 09:24:04 +00:00
|
|
|
/**
|
|
|
|
* \file AppleSupport.m
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Stephan Witt
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#include "AppleSupport.h"
|
|
|
|
|
|
|
|
|
|
|
|
void appleCleanupEditMenu() {
|
|
|
|
|
|
|
|
// Remove (disable) the "Start Dictation..." and "Emoji & Symbols" menu items
|
|
|
|
// from the "Edit" menu
|
|
|
|
|
|
|
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledDictationMenuItem"];
|
|
|
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledCharacterPaletteMenuItem"];
|
2020-08-30 13:34:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void appleCleanupViewMenu() {
|
|
|
|
|
|
|
|
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
|
|
|
|
// Remove the "Show Tab Bar" menu item from the "View" menu, if supported
|
|
|
|
if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)])
|
|
|
|
NSWindow.allowsAutomaticWindowTabbing = NO;
|
|
|
|
#endif
|
2020-08-30 09:24:04 +00:00
|
|
|
|
2020-08-30 13:34:44 +00:00
|
|
|
// Remove the "Enter Full Screen" menu item from the "View" menu
|
|
|
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
|
2020-08-30 09:24:04 +00:00
|
|
|
}
|