From bea3dac3bd28b76b42ff308753b466afd0f21b43 Mon Sep 17 00:00:00 2001 From: emsquared Date: Wed, 8 Aug 2012 22:12:32 -0400 Subject: [PATCH] Fast enumerate our objects. --- Resources/Info.plist | 4 +-- .../English.lproj/BasicLanguage.strings | 3 +++ .../Plugins/System Profiler/TPI_SP_SysInfo.m | 26 ++++++++++++------- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Resources/Info.plist b/Resources/Info.plist index 1a88c0ff14..3d69bb39cc 100755 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -47,8 +47,8 @@ TXBundleBuildCodeName Turtle Soup TXBundleBuildNumber - 12325 + 12328 TXBundleBuildReference - 2.1.1-289-g8dfa27e-appstore + 2.1.1-290-gcca654d-debug diff --git a/Resources/Localization/English.lproj/BasicLanguage.strings b/Resources/Localization/English.lproj/BasicLanguage.strings index d2109bcb82..69803cb40c 100644 --- a/Resources/Localization/English.lproj/BasicLanguage.strings +++ b/Resources/Localization/English.lproj/BasicLanguage.strings @@ -351,6 +351,9 @@ "SystemInformationCompiledOutputLoad" = " \002Load:\002 %@%% \002•\002"; "SystemInformationCompiledOutputOSVersion" = " \002OS:\002 %1$@ %2$@ (%3$@) (Build %4$@)"; +"SystemInformationGraphicsInformationResultBase" = "%@"; +"SystemInformationGraphicsInformationResultMiddle" = ", %@"; + "SystemInformationOSVersionSnowLeopard" = "Snow Leopard"; "SystemInformationOSVersionLion" = "Lion"; "SystemInformationOSVersionMountainLion" = "Mountain Lion"; diff --git a/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m b/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m index 7dac6a822f..9dbe2d422e 100755 --- a/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m +++ b/Resources/Plugins/System Profiler/TPI_SP_SysInfo.m @@ -517,18 +517,24 @@ + (NSString *)graphicsCardInfo CFRelease(serviceDictionary); } + + // ---- // + + NSInteger objectIndex = 0; - NSString *res = NSStringEmptyPlaceholder; - - for (NSInteger i = 0; i < [gpuList count]; i++) { - res = [res stringByAppendingString:[gpuList objectAtIndex:i]]; - - if (i + 1 < [gpuList count]) { - res = [res stringByAppendingString:@", "]; - } - } + NSMutableString *result = [NSMutableString string]; + + for (NSString *model in gpuList) { + if (objectIndex == 0) { + [result appendString:TXTFLS(@"SystemInformationGraphicsInformationResultBase", model)]; + } else { + [result appendString:TXTFLS(@"SystemInformationGraphicsInformationResultMiddle", model)]; + } + + objectIndex++; + } - return res; + return result; } return nil;