1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

in stats, display sizes in mb's instead of bytes

This commit is contained in:
Mitchell Livingston 2007-11-26 19:39:08 +00:00
parent e9f1e35756
commit 845568f0be

View file

@ -79,12 +79,13 @@ tr_handle * fLib;
tr_getCumulativeSessionStats(fLib, &statsAll);
tr_getSessionStats(fLib, &statsSession);
[fUploadedField setStringValue: [NSString stringForFileSize: statsSession.uploadedMiB]];
[fUploadedAllField setStringValue: [[NSString stringForFileSize: statsAll.uploadedMiB]
#warning make display better
[fUploadedField setStringValue: [NSString stringForFileSize: statsSession.uploadedMiB * 1048576]];
[fUploadedAllField setStringValue: [[NSString stringForFileSize: statsAll.uploadedMiB * 1048576]
stringByAppendingString: NSLocalizedString(@" total", "stats total")]];
[fDownloadedField setStringValue: [NSString stringForFileSize: statsSession.downloadedMiB]];
[fDownloadedAllField setStringValue: [[NSString stringForFileSize: statsAll.downloadedMiB]
[fDownloadedField setStringValue: [NSString stringForFileSize: statsSession.downloadedMiB * 1048576]];
[fDownloadedAllField setStringValue: [[NSString stringForFileSize: statsAll.downloadedMiB * 1048576]
stringByAppendingString: NSLocalizedString(@" total", "stats total")]];
[fRatioField setStringValue: [NSString stringForRatio: statsSession.ratio]];