Merge pull request #7415 from electron/disable-tab-menu-on-sierra
Hide Show Tab Bar menu item on macOS Sierra
This commit is contained in:
commit
11d16a7342
1 changed files with 8 additions and 0 deletions
|
@ -10,6 +10,10 @@
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
|
|
||||||
|
@interface NSWindow (SierraSDK)
|
||||||
|
@property(class) BOOL allowsAutomaticWindowTabbing;
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation AtomApplicationDelegate
|
@implementation AtomApplicationDelegate
|
||||||
|
|
||||||
- (void)setApplicationDockMenu:(atom::AtomMenuModel*)model {
|
- (void)setApplicationDockMenu:(atom::AtomMenuModel*)model {
|
||||||
|
@ -21,6 +25,10 @@
|
||||||
// Don't add the "Enter Full Screen" menu item automatically.
|
// Don't add the "Enter Full Screen" menu item automatically.
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
|
||||||
|
|
||||||
|
// Don't add the "Show Tab Bar" menu item.
|
||||||
|
if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)])
|
||||||
|
NSWindow.allowsAutomaticWindowTabbing = NO;
|
||||||
|
|
||||||
atom::Browser::Get()->WillFinishLaunching();
|
atom::Browser::Get()->WillFinishLaunching();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue