aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindow.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPWindow.m')
-rw-r--r--Source/SPWindow.m18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/SPWindow.m b/Source/SPWindow.m
index cda7eb63..383b7fcd 100644
--- a/Source/SPWindow.m
+++ b/Source/SPWindow.m
@@ -32,7 +32,9 @@
#import "SPWindowController.h"
@interface NSWindow (LionPlusMethods)
+
- (void)toggleFullScreen:(id)sender;
+
@end
@implementation SPWindow
@@ -40,6 +42,18 @@
@synthesize isSheetWhichCanBecomeMain;
#pragma mark -
+
++ (void)initialize
+{
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12
+ // Disable automatic window tabbing on 10.12+
+ if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) {
+ [NSWindow setAllowsAutomaticWindowTabbing:NO];
+ }
+#endif
+}
+
+#pragma mark -
#pragma mark Keyboard shortcut additions
/**
@@ -140,7 +154,9 @@
{
if ([[self windowController] respondsToSelector:@selector(selectedTableDocument)]) {
return [[[self windowController] selectedTableDocument] undoManager];
+
}
+
return [super undoManager];
}
@@ -153,7 +169,6 @@
*/
- (BOOL)canBecomeMainWindow
{
-
// If this window is a sheet which is permitted to become main, respond appropriately
if ([self isSheet] && isSheetWhichCanBecomeMain) {
return [self isVisible];
@@ -190,7 +205,6 @@
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
-
// If the item is the Show/Hide Toolbar menu item, override the text to allow correct translation
if ([menuItem action] == @selector(toggleToolbarShown:)) {
BOOL theResponse = [super validateMenuItem:menuItem];