mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
show bytes in tooltip
This commit is contained in:
parent
0663c4aef7
commit
0997148fbd
2 changed files with 14 additions and 1 deletions
|
@ -205,7 +205,9 @@ typedef enum
|
|||
}
|
||||
|
||||
[fBasicInfoField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d Files, %@ Total",
|
||||
"Inspector -> torrents"), fileCount, [NSString stringForFileSize: size]]];
|
||||
"Inspector -> above tabs -> selected torrents"), fileCount, [NSString stringForFileSize: size]]];
|
||||
[fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes",
|
||||
"Inspector -> above tabs -> selected torrents"), size]];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -213,6 +215,7 @@ typedef enum
|
|||
|
||||
[fNameField setStringValue: NSLocalizedString(@"No Torrents Selected", "Inspector -> above tabs -> selected torrents")];
|
||||
[fBasicInfoField setStringValue: @""];
|
||||
[fBasicInfoField setToolTip: @""];
|
||||
|
||||
[fHaveField setStringValue: @""];
|
||||
[fDownloadedTotalField setStringValue: @""];
|
||||
|
@ -338,6 +341,8 @@ typedef enum
|
|||
basicString = [fileString stringByAppendingString: basicString];
|
||||
}
|
||||
[fBasicInfoField setStringValue: basicString];
|
||||
[fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes",
|
||||
"Inspector -> above tabs -> selected torrents"), [torrent size]]];
|
||||
|
||||
NSArray * allTrackers = [torrent allTrackers], * subTrackers;
|
||||
NSMutableArray * trackerStrings = [NSMutableArray arrayWithCapacity: [allTrackers count]];
|
||||
|
|
|
@ -80,12 +80,20 @@ tr_handle * fLib;
|
|||
tr_getSessionStats(fLib, &statsSession);
|
||||
|
||||
[fUploadedField setStringValue: [NSString stringForFileSize: statsSession.uploadedBytes]];
|
||||
[fUploadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"),
|
||||
statsSession.uploadedBytes]];
|
||||
[fUploadedAllField setStringValue: [[NSString stringForFileSize: statsAll.uploadedBytes]
|
||||
stringByAppendingString: NSLocalizedString(@" total", "stats total")]];
|
||||
[fUploadedAllField setToolTip: [NSString stringWithFormat:NSLocalizedString(@"%u bytes", "stats -> bytes"),
|
||||
statsAll.uploadedBytes]];
|
||||
|
||||
[fDownloadedField setStringValue: [NSString stringForFileSize: statsSession.downloadedBytes]];
|
||||
[fDownloadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"),
|
||||
statsSession.downloadedBytes]];
|
||||
[fDownloadedAllField setStringValue: [[NSString stringForFileSize: statsAll.downloadedBytes]
|
||||
stringByAppendingString: NSLocalizedString(@" total", "stats total")]];
|
||||
[fDownloadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"),
|
||||
statsAll.downloadedBytes]];
|
||||
|
||||
[fRatioField setStringValue: [NSString stringForRatio: statsSession.ratio]];
|
||||
|
||||
|
|
Loading…
Reference in a new issue