attempt to fix "0 times" stats bug

This commit is contained in:
Mitchell Livingston 2008-05-24 23:51:51 +00:00
parent d39b7dced7
commit 9d2a738cfe
1 changed files with 5 additions and 5 deletions

View File

@ -167,19 +167,19 @@ tr_handle * fLib;
tr_sessionGetStats(fLib, &statsSession);
[fUploadedField setStringValue: [NSString stringForFileSize: statsSession.uploadedBytes]];
[fUploadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"),
[fUploadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
statsSession.uploadedBytes]];
[fUploadedAllField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ total", "stats total"),
[NSString stringForFileSize: statsAll.uploadedBytes]]];
[fUploadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"),
[fUploadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
statsAll.uploadedBytes]];
[fDownloadedField setStringValue: [NSString stringForFileSize: statsSession.downloadedBytes]];
[fDownloadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"),
[fDownloadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
statsSession.downloadedBytes]];
[fDownloadedAllField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ total", "stats total"),
[NSString stringForFileSize: statsAll.downloadedBytes]]];
[fDownloadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"),
[fDownloadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%llu bytes", "stats -> bytes"),
statsAll.downloadedBytes]];
[fRatioField setStringValue: [NSString stringForRatio: statsSession.ratio]];
@ -196,7 +196,7 @@ tr_handle * fLib;
if (statsAll.sessionCount == 1)
[fNumOpenedField setStringValue: NSLocalizedString(@"1 time", "stats window -> times opened")];
else
[fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%u times", "stats window -> times opened"),
[fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%llu times", "stats window -> times opened"),
statsAll.sessionCount]];
}