aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConstants.h17
-rw-r--r--Source/SPWindow.m18
2 files changed, 28 insertions, 7 deletions
diff --git a/Source/SPConstants.h b/Source/SPConstants.h
index 161b5b0b..71b0c49b 100644
--- a/Source/SPConstants.h
+++ b/Source/SPConstants.h
@@ -665,18 +665,25 @@ typedef NS_ENUM(NSInteger,SPErrorCode) { // error codes in SPErrorDomain
void _SPClear(id *addr);
#define SPClear(x) _SPClear(&x)
-//Backwards compatibility
+// Backwards compatibility
#ifndef __MAC_10_7
-#define __MAC_10_7 1070
+ #define __MAC_10_7 1070
#endif
+
#ifndef __MAC_10_8
-#define __MAC_10_8 1080
+ #define __MAC_10_8 1080
#endif
+
#ifndef __MAC_10_10
-#define __MAC_10_10 101000
+ #define __MAC_10_10 101000
#endif
+
#ifndef __MAC_10_11
-#define __MAC_10_11 101100
+ #define __MAC_10_11 101100
+#endif
+
+#ifndef __MAC_10_12
+ #define __MAC_10_12 101200
#endif
// This enum is available since 10.5 but only got a "name" in 10.10
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];