diff --git a/Classes/Controllers/GrowlController.m b/Classes/Controllers/GrowlController.m index d9ce99d72f..3b1ccb2413 100755 --- a/Classes/Controllers/GrowlController.m +++ b/Classes/Controllers/GrowlController.m @@ -14,7 +14,7 @@ - (id)init { if ((self = [super init])) { #ifdef _USES_NATIVE_NOTIFICATION_CENTER - if ([Preferences applicationRanOnMountainLion]) { + if ([Preferences featureAvailableToOSXMountainLion]) { [_NSUserNotificationCenter() setDelegate:self]; return self; @@ -115,7 +115,7 @@ - (void)notify:(NotificationType)type title:(NSString *)title desc:(NSString *)d } #ifdef _USES_NATIVE_NOTIFICATION_CENTER - if ([Preferences applicationRanOnMountainLion]) { + if ([Preferences featureAvailableToOSXMountainLion]) { NSUserNotification *notification = [NSUserNotification newad]; notification.title = title; diff --git a/Classes/Controllers/MasterController.m b/Classes/Controllers/MasterController.m index f1e573cf84..1decf073c4 100755 --- a/Classes/Controllers/MasterController.m +++ b/Classes/Controllers/MasterController.m @@ -64,7 +64,7 @@ - (void)dealloc - (void)awakeFromNib { -#ifdef _RUNNING_MAC_OS_LION +#ifdef _MAC_OS_LION_OR_NEWER [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; #endif diff --git a/Classes/Controllers/MenuController.m b/Classes/Controllers/MenuController.m index f429496206..c6b7d61f1e 100755 --- a/Classes/Controllers/MenuController.m +++ b/Classes/Controllers/MenuController.m @@ -1666,8 +1666,8 @@ - (void)onWantMainWindowShown:(id)sender - (void)wantsFullScreenModeToggled:(id)sender { -#ifdef _RUNNING_MAC_OS_LION - if ([Preferences applicationRanOnLion]) { +#ifdef _MAC_OS_LION_OR_NEWER + if ([Preferences featureAvailableToOSXLion]) { if (isInFullScreenMode) { [window toggleFullScreen:sender]; [master loadWindowState]; @@ -1702,7 +1702,7 @@ - (void)wantsFullScreenModeToggled:(id)sender [NSApp setPresentationOptions:NSApplicationPresentationDefault]; } -#ifdef _RUNNING_MAC_OS_LION +#ifdef _MAC_OS_LION_OR_NEWER } #endif diff --git a/Classes/Headers/Preferences.h b/Classes/Headers/Preferences.h index b4baf236e2..7700c9b7e8 100755 --- a/Classes/Headers/Preferences.h +++ b/Classes/Headers/Preferences.h @@ -49,8 +49,9 @@ typedef enum { + (NSInteger)totalRunTime; + (void)updateTotalRunTime; -+ (BOOL)applicationRanOnLion; -+ (BOOL)applicationRanOnMountainLion; ++ (BOOL)featureAvailableToOSXLion; ++ (BOOL)featureAvailableToOSXMountainLion; + + (NSData *)applicationIcon; + (NSString *)applicationName; + (NSInteger)applicationProcessID; diff --git a/Classes/Headers/StaticDefinitions.h b/Classes/Headers/StaticDefinitions.h index 68fda1d66d..385f5f5b2e 100755 --- a/Classes/Headers/StaticDefinitions.h +++ b/Classes/Headers/StaticDefinitions.h @@ -2,28 +2,29 @@ #define _LOAD_MAC_OS_LION_LIBRARIES 1 #if _LOAD_MAC_OS_LION_LIBRARIES - #if defined(MAC_OS_X_VERSION_10_7) - #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 - #define _RUNNING_MAC_OS_LION + #if defined(MAC_OS_X_VERSION_10_8) + #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8 + #define _MAC_OS_MOUNTAIN_LION_OR_NEWER #endif #endif - #if defined(MAC_OS_X_VERSION_10_8) - #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8 - #define _RUNNING_MAC_OS_MOUNTAIN_LION + #if defined(MAC_OS_X_VERSION_10_7) + #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + #define _MAC_OS_LION_OR_NEWER #endif #endif + #endif #define NSAppKitVersionNumber10_6 1038 #define NSAppKitVersionNumber10_7 1138 #define NSAppKitVersionNumber10_7_2 1138.23 -#ifdef _RUNNING_MAC_OS_LION +#ifdef _MAC_OS_LION_OR_NEWER #define _USES_MODERN_REGULAR_EXPRESSION #endif -#ifdef _RUNNING_MAC_OS_MOUNTAIN_LION +#ifdef _MAC_OS_MOUNTAIN_LION_OR_NEWER #define _USES_NATIVE_NOTIFICATION_CENTER #endif diff --git a/Classes/Library/TXRegularExpression.m b/Classes/Library/TXRegularExpression.m index ddd5b27bda..dda93cf1e6 100755 --- a/Classes/Library/TXRegularExpression.m +++ b/Classes/Library/TXRegularExpression.m @@ -13,7 +13,7 @@ @implementation TXRegularExpression + (BOOL)useNewRegularExpressionEngine { - return [Preferences applicationRanOnLion]; + return [Preferences featureAvailableToOSXLion]; } + (BOOL)string:(NSString *)haystack isMatchedByRegex:(NSString *)needle diff --git a/Classes/Preferences/Preferences.m b/Classes/Preferences/Preferences.m index 8695076670..8deea04b3a 100755 --- a/Classes/Preferences/Preferences.m +++ b/Classes/Preferences/Preferences.m @@ -155,12 +155,12 @@ + (NSInteger)commandUIndex:(NSString *)command #pragma mark - #pragma mark Application Information -+ (BOOL)applicationRanOnLion ++ (BOOL)featureAvailableToOSXLion { return (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6); } -+ (BOOL)applicationRanOnMountainLion ++ (BOOL)featureAvailableToOSXMountainLion { return (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_7); } diff --git a/Classes/Views/Log/LogController.m b/Classes/Views/Log/LogController.m index 06cfbee93a..f4ccaad1ca 100755 --- a/Classes/Views/Log/LogController.m +++ b/Classes/Views/Log/LogController.m @@ -1010,8 +1010,8 @@ - (void)setUpScroller [(id)scrollView setAllowsHorizontalScrolling:NO]; } -#ifdef _RUNNING_MAC_OS_LION - if ([Preferences applicationRanOnLion]) { +#ifdef _MAC_OS_LION_OR_NEWER + if ([Preferences featureAvailableToOSXLion]) { [scrollView setHorizontalScrollElasticity:NSScrollElasticityNone]; [scrollView setVerticalScrollElasticity:NSScrollElasticityNone]; } diff --git a/Classes/Views/MemberList/MemberListCell.m b/Classes/Views/MemberList/MemberListCell.m index 85b0ec0b61..a44545a408 100755 --- a/Classes/Views/MemberList/MemberListCell.m +++ b/Classes/Views/MemberList/MemberListCell.m @@ -139,7 +139,7 @@ - (void)drawModeBadge:(char)mcstring inCell:(NSRect)badgeFrame isSelected:(BOOL) badgeTextPoint.y -= 1; } - if ([Preferences applicationRanOnMountainLion]) { + if ([Preferences featureAvailableToOSXMountainLion]) { badgeTextPoint.y -= 1; } diff --git a/Classes/Views/ServerList.m b/Classes/Views/ServerList.m index 68a91f76a6..0d114cdf18 100755 --- a/Classes/Views/ServerList.m +++ b/Classes/Views/ServerList.m @@ -12,7 +12,7 @@ - (NSRect)frameOfCellAtColumn:(NSInteger)column row:(NSInteger)row id childItem = [self itemAtRow:row]; if ([self isGroupItem:childItem] == NO) { - if ([Preferences applicationRanOnLion]) { + if ([Preferences featureAvailableToOSXLion]) { nrect.origin.x += 35; nrect.size.width = ([self frame].size.width - 35); } else { diff --git a/Classes/Views/ServerListCell.m b/Classes/Views/ServerListCell.m index 29389eb898..836737b164 100755 --- a/Classes/Views/ServerListCell.m +++ b/Classes/Views/ServerListCell.m @@ -187,7 +187,7 @@ - (NSInteger)drawMessageCountBadge:(NSAttributedString *)mcstring badgeTextPoint = NSMakePoint( (NSMidX(badgeFrame) - (messageCountSize.width / 2.0)), ((NSMidY(badgeFrame) - (messageCountSize.height / 2.0)) + 1)); - if ([Preferences applicationRanOnMountainLion]) { + if ([Preferences featureAvailableToOSXMountainLion]) { badgeTextPoint.y -= 1; } diff --git a/Resources/Miscellaneous/Info.plist b/Resources/Miscellaneous/Info.plist index 8d01e3b239..80a6b24631 100755 --- a/Resources/Miscellaneous/Info.plist +++ b/Resources/Miscellaneous/Info.plist @@ -3,9 +3,9 @@ Build Number - 9617 + 9618 Build Reference - 2.1-231-gd2ad5f2-unstable + 2.1-232-ge2317d3-unstable CFBundleExecutable Textual CFBundleIconFile