diff options
author | Max <post@wickenrode.com> | 2015-02-14 21:45:08 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-02-14 21:45:08 +0100 |
commit | fa28b26e418f6f5c2f47ec78f9b7ef4910155b96 (patch) | |
tree | fae4e9fd8b58e88fc89566bd15a5ddc4cf6396c4 /Source/SPWindowController.m | |
parent | b1e32f6583f113c279dcde61f4f531d637118bdd (diff) | |
download | sequelpro-fa28b26e418f6f5c2f47ec78f9b7ef4910155b96.tar.gz sequelpro-fa28b26e418f6f5c2f47ec78f9b7ef4910155b96.tar.bz2 sequelpro-fa28b26e418f6f5c2f47ec78f9b7ef4910155b96.zip |
Move some duplicate code into a new class
(This also affects PSMSequelProTabStyle, but see the comment there why it is left unchanged)
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r-- | Source/SPWindowController.m | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m index 58afeb16..db94f5ce 100644 --- a/Source/SPWindowController.m +++ b/Source/SPWindowController.m @@ -63,11 +63,8 @@ enum { - (void)awakeFromNib { - systemVersion = 0; selectedTableDocument = nil; - Gestalt(gestaltSystemVersion, &systemVersion); - [[self window] setCollectionBehavior:[[self window] collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary]; // Add a line to the window to hide the line below the title bar when the toolbar is collapsed @@ -517,10 +514,10 @@ enum { { // Set the background colour to match the titlebar window state if ((([[self window] isMainWindow] || [[[self window] attachedSheet] isMainWindow]) && [NSApp isActive])) { - [titleBarLineHidingView setBackgroundColor:[NSColor colorWithCalibratedWhite:(systemVersion >= 0x1070) ? 0.66f : 0.63f alpha:1.0]]; + [titleBarLineHidingView setBackgroundColor:[NSColor colorWithCalibratedWhite:(isOSVersionAtLeast10_7_0) ? 0.66f : 0.63f alpha:1.0]]; } else { - [titleBarLineHidingView setBackgroundColor:[NSColor colorWithCalibratedWhite:(systemVersion >= 0x1070) ? 0.87f : 0.84f alpha:1.0]]; + [titleBarLineHidingView setBackgroundColor:[NSColor colorWithCalibratedWhite:(isOSVersionAtLeast10_7_0) ? 0.87f : 0.84f alpha:1.0]]; } // If the window is fullscreen or the toolbar is showing, hide the view; otherwise show it |