use number formatters when displaying the number of transfers

This commit is contained in:
Mitchell Livingston
2010-11-14 18:33:57 +00:00
parent 904f09a076
commit 69fcecce1a
3 changed files with 19 additions and 8 deletions

View File

@@ -503,11 +503,10 @@ tr_session * fHandle;
if (exists)
{
NSNumberFormatter * numberFormatter = [[NSNumberFormatter alloc] init];
NSNumberFormatter * numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
[numberFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
[numberFormatter setMaximumFractionDigits: 0];
NSString * countString = [numberFormatter stringFromNumber: [NSNumber numberWithInt: tr_blocklistGetRuleCount(fHandle)]];
[numberFormatter release];
[fBlocklistMessageField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ IP address rules in list",
"Prefs -> blocklist -> message"), countString]];