Skip to content

Commit

Permalink
Fast enumerate our objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
emsquared committed Aug 9, 2012
1 parent cca654d commit bea3dac
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<key>TXBundleBuildCodeName</key>
<string>Turtle Soup</string>
<key>TXBundleBuildNumber</key>
<string>12325</string>
<string>12328</string>
<key>TXBundleBuildReference</key>
<string>2.1.1-289-g8dfa27e-appstore</string>
<string>2.1.1-290-gcca654d-debug</string>
</dict>
</plist>
3 changes: 3 additions & 0 deletions Resources/Localization/English.lproj/BasicLanguage.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
26 changes: 16 additions & 10 deletions Resources/Plugins/System Profiler/TPI_SP_SysInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bea3dac

Please sign in to comment.