1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

percentage next to valid downloaded in inspector

This commit is contained in:
Mitchell Livingston 2006-08-17 03:24:40 +00:00
parent da555b7c6f
commit dc282004c8
2 changed files with 7 additions and 10 deletions

View file

@ -39,9 +39,7 @@
* fAnnounceField, * fPieceSizeField, * fPiecesField, * fAnnounceField, * fPieceSizeField, * fPiecesField,
* fHashField, * fHashField,
* fTorrentLocationField, * fDataLocationField, * fTorrentLocationField, * fDataLocationField,
* fDateStartedField, * fDateStartedField, * fStateField,
//* fPercentField,
* fStateField,
* fDownloadedValidField, * fDownloadedTotalField, * fUploadedTotalField, * fDownloadedValidField, * fDownloadedTotalField, * fUploadedTotalField,
* fRatioField, * fSeedersField, * fLeechersField, * fRatioField, * fSeedersField, * fLeechersField,
* fConnectedPeersField, * fDownloadingFromField, * fUploadingToField, * fSwarmSpeedField; * fConnectedPeersField, * fDownloadingFromField, * fUploadingToField, * fSwarmSpeedField;

View file

@ -156,9 +156,6 @@
[fDataLocationField setSelectable: NO]; [fDataLocationField setSelectable: NO];
[fStateField setStringValue: @""]; [fStateField setStringValue: @""];
/*
[fPercentField setStringValue: @""];
*/
[fRatioField setStringValue: @""]; [fRatioField setStringValue: @""];
[fSeedersField setStringValue: @""]; [fSeedersField setStringValue: @""];
@ -248,11 +245,13 @@
if (numberSelected == 1) if (numberSelected == 1)
{ {
torrent = [fTorrents objectAtIndex: 0]; torrent = [fTorrents objectAtIndex: 0];
//append percentage to amount downloaded if 1 torrent
[fDownloadedValidField setStringValue: [[fDownloadedValidField stringValue]
stringByAppendingFormat: @" (%.2f%%)", 100.0 * [torrent progress]]];
[fStateField setStringValue: [torrent stateString]]; [fStateField setStringValue: [torrent stateString]];
/*
[fPercentField setStringValue: [NSString stringWithFormat: @"%.2f%%", 100.0 * [torrent progress]]];
*/
int seeders = [torrent seeders], leechers = [torrent leechers]; int seeders = [torrent seeders], leechers = [torrent leechers];
[fSeedersField setStringValue: seeders < 0 ? @"" : [NSString stringWithInt: seeders]]; [fSeedersField setStringValue: seeders < 0 ? @"" : [NSString stringWithInt: seeders]];
[fLeechersField setStringValue: leechers < 0 ? @"" : [NSString stringWithInt: leechers]]; [fLeechersField setStringValue: leechers < 0 ? @"" : [NSString stringWithInt: leechers]];