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/SPFavoritesOutlineView.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/SPFavoritesOutlineView.m')
-rw-r--r-- | Source/SPFavoritesOutlineView.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/SPFavoritesOutlineView.m b/Source/SPFavoritesOutlineView.m index 01eb7b04..2e111925 100644 --- a/Source/SPFavoritesOutlineView.m +++ b/Source/SPFavoritesOutlineView.m @@ -39,8 +39,7 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; - (void)awakeFromNib { - systemVersion = 0; - Gestalt(gestaltSystemVersion, &systemVersion); + isOSVersionAtLeast10_7_0 = [SPOSInfo isOSVersionAtLeastMajor:10 minor:7 patch:0]; } - (BOOL)acceptsFirstResponder @@ -129,7 +128,7 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; NSRect superFrame = [super frameOfCellAtColumn:columnIndex row:rowIndex]; // On system versions lower than Lion, don't alter padding - if (systemVersion < 0x1070) { + if (!isOSVersionAtLeast10_7_0) { return superFrame; } @@ -159,7 +158,7 @@ static NSUInteger SPFavoritesOutlineViewUnindent = 6; } // On versions of Lion or above, amend the padding appropriately - if (systemVersion >= 0x1070) { + if (isOSVersionAtLeast10_7_0) { return NSMakeRect(superFrame.origin.x + SPFavoritesOutlineViewUnindent, superFrame.origin.y, superFrame.size.width, superFrame.size.height); } |