diff --git a/Frameworks/Auto Hyperlinks/Source/Hyperlink Processor Framework.xcodeproj/project.pbxproj b/Frameworks/Auto Hyperlinks/Source/Hyperlink Processor Framework.xcodeproj/project.pbxproj index 945063b969..f3895d90fb 100644 --- a/Frameworks/Auto Hyperlinks/Source/Hyperlink Processor Framework.xcodeproj/project.pbxproj +++ b/Frameworks/Auto Hyperlinks/Source/Hyperlink Processor Framework.xcodeproj/project.pbxproj @@ -227,12 +227,14 @@ DA8A8084085549EE00F24BB3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + SDKROOT = macosx; }; name = Debug; }; DA8A8085085549EE00F24BB3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + SDKROOT = macosx; }; name = Release; }; @@ -255,6 +257,7 @@ GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", @@ -286,6 +289,7 @@ GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", diff --git a/Frameworks/Auto Hyperlinks/Source/Source/AHHyperlinkScanner.m b/Frameworks/Auto Hyperlinks/Source/Source/AHHyperlinkScanner.m index 4a4c83cf62..34876b6b22 100644 --- a/Frameworks/Auto Hyperlinks/Source/Source/AHHyperlinkScanner.m +++ b/Frameworks/Auto Hyperlinks/Source/Source/AHHyperlinkScanner.m @@ -104,10 +104,10 @@ + (void)initialize puncSet = [NSCharacterSet characterSetWithBitmapRepresentation:[mutablePuncSet bitmapRepresentation]]; endSet = [NSCharacterSet characterSetWithCharactersInString:@"\"',:;>)]}.?!@"]; hostnameComponentSeparatorSet = [NSCharacterSet characterSetWithCharactersInString:@"./"]; - enclosureStartArray = [NSArray arrayWithObjects:@"(",@"[",@"{",nil]; + enclosureStartArray = @[@"(",@"[",@"{"]; enclosureSet = [NSCharacterSet characterSetWithCharactersInString:@"()[]{}"]; - enclosureStopArray = [NSArray arrayWithObjects:@")",@"]",@"}",nil]; - encKeys = [NSArray arrayWithObjects:ENC_INDEX_KEY, ENC_CHAR_KEY, nil]; + enclosureStopArray = @[@")",@"]",@"}"]; + encKeys = @[ENC_INDEX_KEY, ENC_CHAR_KEY]; } } @@ -121,7 +121,7 @@ - (NSArray *)matchesForString:(NSString *)inString m_strictChecking = NO; m_scanString = inString; m_scanStringLength = [m_scanString length]; - m_urlSchemes = [NSDictionary dictionaryWithObjectsAndKeys:@"ftp://", @"ftp", nil]; + m_urlSchemes = @{@"ftp": @"ftp://"}; return [self _allMatches]; } @@ -131,7 +131,7 @@ - (NSArray *)strictMatchesForString:(NSString *)inString m_strictChecking = YES; m_scanString = inString; m_scanStringLength = [m_scanString length]; - m_urlSchemes = [NSDictionary dictionaryWithObjectsAndKeys:@"ftp://", @"ftp", nil]; + m_urlSchemes = @{@"ftp": @"ftp://"}; return [self _allMatches]; } @@ -213,7 +213,7 @@ - (NSString *)nextURI unsigned long encIdx = [enclosureStartArray indexOfObject:[m_scanString substringWithRange:NSMakeRange(scannedRange.location, 1)]]; if (encIdx != NSNotFound) { - NSRange encRange = [m_scanString rangeOfString:[enclosureStopArray objectAtIndex:encIdx] options:NSBackwardsSearch range:scannedRange]; + NSRange encRange = [m_scanString rangeOfString:enclosureStopArray[encIdx] options:NSBackwardsSearch range:scannedRange]; scannedRange.location++; @@ -333,7 +333,7 @@ - (NSRange)_longestBalancedEnclosureInRange:(NSRange)inRange matchChar = [m_scanString substringWithRange:NSMakeRange(encScanLocation, 1)]; if ([enclosureStartArray containsObject:matchChar]) { - encDict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithUnsignedLong:encScanLocation], matchChar, nil] + encDict = [NSDictionary dictionaryWithObjects:@[@(encScanLocation), matchChar] forKeys:encKeys]; if (enclosureStack == nil) { @@ -345,8 +345,8 @@ - (NSRange)_longestBalancedEnclosureInRange:(NSRange)inRange NSEnumerator *encEnumerator = [enclosureStack objectEnumerator]; while ((encDict = [encEnumerator nextObject])) { - unsigned long encTagIndex = [[encDict objectForKey:ENC_INDEX_KEY] unsignedLongValue]; - unsigned long encStartIndex = [enclosureStartArray indexOfObjectIdenticalTo:[encDict objectForKey:ENC_CHAR_KEY]]; + unsigned long encTagIndex = [encDict[ENC_INDEX_KEY] unsignedLongValue]; + unsigned long encStartIndex = [enclosureStartArray indexOfObjectIdenticalTo:encDict[ENC_CHAR_KEY]]; if ([enclosureStopArray indexOfObjectIdenticalTo:matchChar] == encStartIndex) { NSRange encRange = NSMakeRange(encTagIndex, (encScanLocation - encTagIndex + 1)); diff --git a/Frameworks/Blowfish Encryption/Source/Blowfish Encryption Framework.xcodeproj/project.pbxproj b/Frameworks/Blowfish Encryption/Source/Blowfish Encryption Framework.xcodeproj/project.pbxproj index 116ff93c69..6b9ea5009f 100644 --- a/Frameworks/Blowfish Encryption/Source/Blowfish Encryption Framework.xcodeproj/project.pbxproj +++ b/Frameworks/Blowfish Encryption/Source/Blowfish Encryption Framework.xcodeproj/project.pbxproj @@ -274,6 +274,7 @@ "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = Debug; }; @@ -284,6 +285,7 @@ "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = Release; }; @@ -306,6 +308,7 @@ GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.6; PRODUCT_NAME = BlowfishEncryption; PROVISIONING_PROFILE = ""; VERSION_INFO_BUILDER = "${USER}"; @@ -333,6 +336,7 @@ GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.6; PRODUCT_NAME = BlowfishEncryption; PROVISIONING_PROFILE = ""; VERSION_INFO_BUILDER = "Codeux Software"; diff --git a/Frameworks/Blowfish Encryption/Source/Classes/DH1080.mm b/Frameworks/Blowfish Encryption/Source/Classes/DH1080.mm index 698758ab56..4bd5e08d4a 100644 --- a/Frameworks/Blowfish Encryption/Source/Classes/DH1080.mm +++ b/Frameworks/Blowfish Encryption/Source/Classes/DH1080.mm @@ -26,7 +26,7 @@ - (NSString *)generatePublicKey if (keyExchanger->generate()) { keyExchanger->get_public_key(publicKey); - NSString *_publicKey = [NSString stringWithUTF8String:publicKey.c_str()]; + NSString *_publicKey = @(publicKey.c_str()); if ([_publicKey length] >= 1) { return _publicKey; diff --git a/Main Project (Textual).xcodeproj/project.pbxproj b/Main Project (Textual).xcodeproj/project.pbxproj index e3607fdafc..cf05cf4e4f 100644 --- a/Main Project (Textual).xcodeproj/project.pbxproj +++ b/Main Project (Textual).xcodeproj/project.pbxproj @@ -428,7 +428,7 @@ /* Begin PBXCopyFilesBuildPhase section */ 4C52AED515811C2000940619 /* Copy Extensions */ = { isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; + buildActionMask = 12; dstPath = Extensions; dstSubfolderSpec = 7; files = ( @@ -437,7 +437,7 @@ 4C88DBB015811D3A002EC37B /* SystemProfiler.bundle in Copy Extensions */, ); name = "Copy Extensions"; - runOnlyForDeploymentPostprocessing = 1; + runOnlyForDeploymentPostprocessing = 0; }; 4CCF2F9815804BB9006FFE21 /* Copy JavaScript Files */ = { isa = PBXCopyFilesBuildPhase; @@ -2002,7 +2002,7 @@ }; 4C01BA101581104D007E2DAF /* Build Extensions */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 8; + buildActionMask = 12; files = ( ); inputPaths = ( @@ -2010,7 +2010,7 @@ name = "Build Extensions"; outputPaths = ( ); - runOnlyForDeploymentPostprocessing = 1; + runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\ncd \"$PROJECT_DIR/Resources/Plugins/Blowfish Key Control\"\nxcodebuild -alltargets -configuration \"$CONFIGURATION\" NATIVE_ARCH=\"$NATIVE_ARCH\" FRAMEWORK_SEARCH_PATHS=\"$PROJECT_DIR/Frameworks/**\" HEADER_SEARCH_PATHS=\"$PROJECT_DIR/Classes/Headers/**\" BUNDLE_LOADER=\"$CODESIGNING_FOLDER_PATH/Contents/MacOS/$EXECUTABLE_NAME\" CODE_SIGN_IDENTITY=\"$CODE_SIGN_IDENTITY\" SHARED_PRECOMPS_DIR=/tmp/com.codeux.irc.textual/SharedPCH\n\ncd \"$PROJECT_DIR/Resources/Plugins/Brag Spam\"\nxcodebuild -alltargets -configuration \"$CONFIGURATION\" NATIVE_ARCH=\"$NATIVE_ARCH\" FRAMEWORK_SEARCH_PATHS=\"$PROJECT_DIR/Frameworks/**\" HEADER_SEARCH_PATHS=\"$PROJECT_DIR/Classes/Headers/**\" BUNDLE_LOADER=\"$CODESIGNING_FOLDER_PATH/Contents/MacOS/$EXECUTABLE_NAME\" CODE_SIGN_IDENTITY=\"$CODE_SIGN_IDENTITY\" SHARED_PRECOMPS_DIR=/tmp/com.codeux.irc.textual/SharedPCH\n\ncd \"$PROJECT_DIR/Resources/Plugins/System Profiler\"\nxcodebuild -alltargets -configuration \"$CONFIGURATION\" NATIVE_ARCH=\"$NATIVE_ARCH\" FRAMEWORK_SEARCH_PATHS=\"$PROJECT_DIR/Frameworks/**\" HEADER_SEARCH_PATHS=\"$PROJECT_DIR/Classes/Headers/**\" BUNDLE_LOADER=\"$CODESIGNING_FOLDER_PATH/Contents/MacOS/$EXECUTABLE_NAME\" CODE_SIGN_IDENTITY=\"$CODE_SIGN_IDENTITY\" SHARED_PRECOMPS_DIR=/tmp/com.codeux.irc.textual/SharedPCH\n"; showEnvVarsInLog = 0; diff --git a/Resources/Info.plist b/Resources/Info.plist index 4155d89272..06834a4409 100755 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -45,8 +45,8 @@ NSPrincipalClass NSApplication TXBundleBuildNumber - 11423 + 11430 TXBundleBuildReference - 2.1.1-180-ga9dcfad-debug,llvm4.0 + 2.1.1-181-gc045a1b-appstore,llvm4.0 diff --git a/Resources/Plugins/Blowfish Key Control/Blowfish Key Control Extension.xcodeproj/project.pbxproj b/Resources/Plugins/Blowfish Key Control/Blowfish Key Control Extension.xcodeproj/project.pbxproj index 5ff0f63a5e..4451bd9e1d 100755 --- a/Resources/Plugins/Blowfish Key Control/Blowfish Key Control Extension.xcodeproj/project.pbxproj +++ b/Resources/Plugins/Blowfish Key Control/Blowfish Key Control Extension.xcodeproj/project.pbxproj @@ -171,20 +171,24 @@ 1DEB911B08733D790010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = Debug; }; 1DEB911C08733D790010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = Release; }; @@ -282,10 +286,12 @@ 4CAA3B2312E0EC3800FB83EB /* App Store Release */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = "App Store Release"; }; @@ -322,10 +328,12 @@ 4CAA3B2512E0EC3800FB83EB /* Release (Trial) */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = "Release (Trial)"; }; @@ -362,10 +370,12 @@ 4CCB84A01501C4A30053A181 /* Release + No Sandbox */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = "Release + No Sandbox"; }; diff --git a/Resources/Plugins/Blowfish Key Control/TPI_BlowfishCommands.m b/Resources/Plugins/Blowfish Key Control/TPI_BlowfishCommands.m index 8d5f3be1d0..b240e8d06a 100755 --- a/Resources/Plugins/Blowfish Key Control/TPI_BlowfishCommands.m +++ b/Resources/Plugins/Blowfish Key Control/TPI_BlowfishCommands.m @@ -62,7 +62,7 @@ - (void)messageSentByUser:(IRCClient *)client - (NSArray *)pluginSupportsUserInputCommands { - return [NSArray arrayWithObjects:@"setkey", @"delkey", @"key", @"keyx", nil]; + return @[@"setkey", @"delkey", @"key", @"keyx"]; } - (NSDictionary *)pluginOutputDisplayRules @@ -71,13 +71,13 @@ - (NSDictionary *)pluginOutputDisplayRules NSMutableDictionary *rules = [NSMutableDictionary dictionary]; - NSArray *privmsgRule_1 = [NSArray arrayWithObjects:[@"^" stringByAppendingString:TXExchangeRequestPrefix], - NSNumberWithBOOL(YES), NSNumberWithBOOL(YES), NSNumberWithBOOL(YES), nil]; + NSArray *privmsgRule_1 = @[[@"^" stringByAppendingString:TXExchangeRequestPrefix], + NSNumberWithBOOL(YES), NSNumberWithBOOL(YES), NSNumberWithBOOL(YES)]; - NSArray *privmsgRule_2 = [NSArray arrayWithObjects:[@"^" stringByAppendingString:TXExchangeResponsePrefix], - NSNumberWithBOOL(YES), NSNumberWithBOOL(YES), NSNumberWithBOOL(YES), nil]; + NSArray *privmsgRule_2 = @[[@"^" stringByAppendingString:TXExchangeResponsePrefix], + NSNumberWithBOOL(YES), NSNumberWithBOOL(YES), NSNumberWithBOOL(YES)]; - [rules setObject:[NSArray arrayWithObjects:privmsgRule_1, privmsgRule_2, nil] forKey:IRCCommandFromLineType(TVCLogLineNoticeType)]; + rules[IRCCommandFromLineType(TVCLogLineNoticeType)] = @[privmsgRule_1, privmsgRule_2]; return rules; } diff --git a/Resources/Plugins/Brag Spam/Brag Spam Extension.xcodeproj/project.pbxproj b/Resources/Plugins/Brag Spam/Brag Spam Extension.xcodeproj/project.pbxproj index 60d328b68d..3dec9b45ff 100755 --- a/Resources/Plugins/Brag Spam/Brag Spam Extension.xcodeproj/project.pbxproj +++ b/Resources/Plugins/Brag Spam/Brag Spam Extension.xcodeproj/project.pbxproj @@ -163,20 +163,24 @@ 1DEB911B08733D790010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = Debug; }; 1DEB911C08733D790010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = Release; }; @@ -265,10 +269,12 @@ 4CAA3B4C12E0EC7C00FB83EB /* App Store Release */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = "App Store Release"; }; @@ -302,10 +308,12 @@ 4CAA3B4E12E0EC7C00FB83EB /* Release (Trial) */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = "Release (Trial)"; }; @@ -339,10 +347,12 @@ 4CCB84A31501C5690053A181 /* Release + No Sandbox */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; OTHER_CFLAGS = ( "-Xclang", "-fobjc-runtime-has-weak", ); + SDKROOT = macosx; }; name = "Release + No Sandbox"; }; diff --git a/Resources/Plugins/Brag Spam/TPIBragSpam.m b/Resources/Plugins/Brag Spam/TPIBragSpam.m index ced61de442..86efccb74b 100755 --- a/Resources/Plugins/Brag Spam/TPIBragSpam.m +++ b/Resources/Plugins/Brag Spam/TPIBragSpam.m @@ -97,12 +97,12 @@ - (void)messageSentByUser:(IRCClient*)client if (NSObjectIsEmpty(chanlist)) { [result appendString:TXTFLS(@"BragspamPluginChannelResultNone", client.config.network)]; } else { - cc = [chanlist objectAtIndex:0]; + cc = chanlist[0]; if (chanlist.count == 1) { [result appendString:TXTFLS(@"BragspamPluginChannelResultSingle", cc.name, client.config.network)]; } else if (chanlist.count == 2) { - IRCChannel *ccsecond = [chanlist objectAtIndex:1]; + IRCChannel *ccsecond = chanlist[1]; [result appendString:TXTFLS(@"BragspamPluginChannelResultDouble", cc.name, ccsecond.name, client.config.network)]; } else { @@ -127,7 +127,7 @@ - (void)messageSentByUser:(IRCClient*)client - (NSArray*)pluginSupportsUserInputCommands { - return [NSArray arrayWithObjects:@"brag", @"cbrag", nil]; + return @[@"brag", @"cbrag"]; } @end diff --git a/Resources/Plugins/System Profiler/System Profiler Extension.xcodeproj/project.pbxproj b/Resources/Plugins/System Profiler/System Profiler Extension.xcodeproj/project.pbxproj index fc892df89b..35ae7fc96b 100755 --- a/Resources/Plugins/System Profiler/System Profiler Extension.xcodeproj/project.pbxproj +++ b/Resources/Plugins/System Profiler/System Profiler Extension.xcodeproj/project.pbxproj @@ -179,12 +179,16 @@ 1DEB911B08733D790010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; + SDKROOT = macosx; }; name = Debug; }; 1DEB911C08733D790010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; + SDKROOT = macosx; }; name = Release; }; @@ -285,6 +289,8 @@ 4CAA3B2312E0EC3800FB83EB /* App Store Release */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; + SDKROOT = macosx; }; name = "App Store Release"; }; @@ -322,6 +328,8 @@ 4CAA3B2512E0EC3800FB83EB /* Release (Trial) */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; + SDKROOT = macosx; }; name = "Release (Trial)"; }; @@ -359,6 +367,8 @@ 4CCB84A51501C57D0053A181 /* Release + No Sandbox */ = { isa = XCBuildConfiguration; buildSettings = { + MACOSX_DEPLOYMENT_TARGET = 10.6.8; + SDKROOT = macosx; }; name = "Release + No Sandbox"; }; diff --git a/Resources/Plugins/System Profiler/TPISystemProfiler.m b/Resources/Plugins/System Profiler/TPISystemProfiler.m index 9e9af17e4c..150404a866 100755 --- a/Resources/Plugins/System Profiler/TPISystemProfiler.m +++ b/Resources/Plugins/System Profiler/TPISystemProfiler.m @@ -8,9 +8,9 @@ @implementation TPISystemProfiler - (NSArray *)pluginSupportsUserInputCommands { - return [NSArray arrayWithObjects:@"sysinfo", @"memory", @"uptime", @"netstats", + return @[@"sysinfo", @"memory", @"uptime", @"netstats", @"msgcount", @"diskspace", @"theme", @"screens", @"runcount", @"loadavg", - @"sysmem", nil]; + @"sysmem"]; } - (void)messageSentByUser:(IRCClient *)client diff --git a/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m b/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m index 3c5c425cff..ff8d5c304f 100755 --- a/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m +++ b/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m @@ -47,7 +47,7 @@ + (NSString *)compiledOutput NSString *_exact_model = _model; if ([_all_models containsKey:_model]) { - _exact_model = [_all_models objectForKey:_model]; + _exact_model = _all_models[_model]; } _new = TXTFLS(@"SystemInformationCompiledOutputModel", _exact_model); @@ -106,7 +106,7 @@ + (NSString *)compiledOutput NSArray *allScreens = [NSScreen screens]; if (NSObjectIsNotEmpty(allScreens)) { - NSScreen *maiScreen = [allScreens objectAtIndex:0]; + NSScreen *maiScreen = allScreens[0]; _new = TXTFLS(@"SystemInformationCompiledOutputScreenResolution", maiScreen.frame.size.width, maiScreen.frame.size.height); @@ -124,9 +124,9 @@ + (NSString *)compiledOutput NSString *osname = [self operatingSystemName]; _new = TXTFLS(@"SystemInformationCompiledOutputOSVersion", - [[TPCPreferences systemInfoPlist] objectForKey:@"ProductName"], - [[TPCPreferences systemInfoPlist] objectForKey:@"ProductVersion"], osname, - [[TPCPreferences systemInfoPlist] objectForKey:@"ProductBuildVersion"]); + [TPCPreferences systemInfoPlist][@"ProductName"], + [TPCPreferences systemInfoPlist][@"ProductVersion"], osname, + [TPCPreferences systemInfoPlist][@"ProductBuildVersion"]); sysinfo = [sysinfo stringByAppendingString:_new]; @@ -139,7 +139,7 @@ + (NSString *)activeScreenResolutions NSArray *screens = [NSScreen screens]; if ([screens count] == 1) { - NSScreen *maiScreen = [screens objectAtIndex:0]; + NSScreen *maiScreen = screens[0]; return TXTFLS(@"SystemInformationScreensCommandResultSingle", maiScreen.frame.size.width, maiScreen.frame.size.height); } else { @@ -162,10 +162,10 @@ + (NSString *)activeScreenResolutions + (NSString *)applicationAndSystemUptime { NSString *systemUptime = TXSpecialReadableTime([self _internalSystemUptime], NO, - [NSArray arrayWithObjects:@"day", @"hour", @"minute", @"second", nil]); + @[@"day", @"hour", @"minute", @"second"]); NSString *textualUptime = TXSpecialReadableTime([NSDate secondsSinceUnixTimestamp:[TPCPreferences startTime]], NO, - [NSArray arrayWithObjects:@"day", @"hour", @"minute", @"second", nil]); + @[@"day", @"hour", @"minute", @"second"]); return TXTFLS(@"SystemInformationUptimeCommandResult", systemUptime, textualUptime); } @@ -236,12 +236,12 @@ + (NSString *)networkStats if (objectIndex == 0) { [netstat appendString:TXTFLS(@"SystemInformationNetstatsCommandResultBase", - [NSString stringWithUTF8String:ifa->ifa_name], + @(ifa->ifa_name), [self formattedDiskSize:if_data->ifi_ibytes], [self formattedDiskSize:if_data->ifi_obytes])]; } else { [netstat appendString:TXTFLS(@"SystemInformationNetstatsCommandResultMiddle", - [NSString stringWithUTF8String:ifa->ifa_name], + @(ifa->ifa_name), [self formattedDiskSize:if_data->ifi_ibytes], [self formattedDiskSize:if_data->ifi_obytes])]; } @@ -427,7 +427,7 @@ + (NSString *)graphicsCardInfo CGLSetCurrentContext(cglContext); if (cglContext) { - NSString *model = [NSString stringWithCString:(const char *)glGetString(GL_RENDERER) encoding:NSASCIIStringEncoding]; + NSString *model = @((const char *)glGetString(GL_RENDERER)); return [model stringByReplacingOccurrencesOfString:@" OpenGL Engine" withString:NSStringEmptyPlaceholder]; } @@ -502,7 +502,7 @@ + (NSString *)processor if (0 == sysctlbyname("machdep.cpu.brand_string", buffer, &sz, NULL, 0)) { buffer[(sizeof(buffer) - 1)] = 0; - return [NSString stringWithUTF8String:buffer]; + return @(buffer); } else { return nil; } @@ -517,7 +517,7 @@ + (NSString *)model if (0 == sysctlbyname("hw.model", modelBuffer, &sz, NULL, 0)) { modelBuffer[(sizeof(modelBuffer) - 1)] = 0; - return [NSString stringWithUTF8String:modelBuffer]; + return @(modelBuffer); } else { return nil; } @@ -576,7 +576,7 @@ + (NSString *)processorClockSpeed + (NSString *)operatingSystemName { - NSString *productVersion = [[TPCPreferences systemInfoPlist] objectForKey:@"ProductVersion"]; + NSString *productVersion = [TPCPreferences systemInfoPlist][@"ProductVersion"]; if ([productVersion contains:@"10.6"]) { return TXTLS(@"SystemInformationOSVersionSnowLeopard");