mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
#11756 cleanup the view menu on Mac
Using US english desktop language LyX's Mac OS adds some items to the view menu: 1. Show/Hide Tab Bar and 2. Enter Full Screen These items won't work properly and it's better to hide them.
This commit is contained in:
parent
a99695ce82
commit
292799a4bd
@ -1034,6 +1034,7 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
|
|||||||
///
|
///
|
||||||
setupApplescript();
|
setupApplescript();
|
||||||
appleCleanupEditMenu();
|
appleCleanupEditMenu();
|
||||||
|
appleCleanupViewMenu();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_WS_X11) || defined(QPA_XCB)
|
#if defined(Q_WS_X11) || defined(QPA_XCB)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
void appleCleanupEditMenu();
|
void appleCleanupEditMenu();
|
||||||
|
void appleCleanupViewMenu();
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,5 +19,17 @@ void appleCleanupEditMenu() {
|
|||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledDictationMenuItem"];
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledDictationMenuItem"];
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledCharacterPaletteMenuItem"];
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSDisabledCharacterPaletteMenuItem"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
// Remove the "Enter Full Screen" menu item from the "View" menu
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user