1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 19:34:05 +00:00

Comment out code so connections in Interface Builder don't need to be made and unused calculations aren't made.

This commit is contained in:
Mitchell Livingston 2006-06-20 17:10:35 +00:00
parent c3035276dc
commit e6603def25
4 changed files with 14 additions and 22 deletions

View file

@ -16,7 +16,6 @@
fConnectedPeersField = NSTextField;
fDataLocationField = NSTextField;
fDateStartedField = NSTextField;
fDownloadRateField = NSTextField;
fDownloadedTotalField = NSTextField;
fDownloadedValidField = NSTextField;
fDownloadingFromField = NSTextField;
@ -25,7 +24,6 @@
fImageView = NSImageView;
fLeechersField = NSTextField;
fNameField = NSTextField;
fPercentField = NSTextField;
fPieceSizeField = NSTextField;
fPiecesField = NSTextField;
fRatioField = NSTextField;
@ -33,11 +31,9 @@
fRatioMatrix = NSMatrix;
fSeedersField = NSTextField;
fSizeField = NSTextField;
fStateField = NSTextField;
fTabView = NSTabView;
fTorrentLocationField = NSTextField;
fTrackerField = NSTextField;
fUploadRateField = NSTextField;
fUploadedTotalField = NSTextField;
fUploadingToField = NSTextField;
};

View file

@ -38,10 +38,10 @@
* fHashField,
* fTorrentLocationField, * fDataLocationField,
* fDateStartedField,
#if 0
/*
* fStateField, * fPercentField,
* fDownloadRateField, * fUploadRateField,
#endif
*/
* fDownloadedValidField, * fDownloadedTotalField, * fUploadedTotalField,
* fRatioField, * fSeedersField, * fLeechersField,
* fConnectedPeersField, * fDownloadingFromField, * fUploadingToField;

View file

@ -108,11 +108,10 @@
[fNameField setStringValue: @"No Torrents Selected"];
[fSizeField setStringValue: @""];
#if 0
/*
[fDownloadRateField setStringValue: @""];
[fUploadRateField setStringValue: @""];
#endif
*/
[fDownloadedValidField setStringValue: @""];
[fDownloadedTotalField setStringValue: @""];
[fUploadedTotalField setStringValue: @""];
@ -137,10 +136,10 @@
[fDataLocationField setToolTip: nil];
[fDateStartedField setStringValue: @""];
#if 0
/*
[fStateField setStringValue: @""];
[fPercentField setStringValue: @""];
#endif
*/
[fRatioField setStringValue: @""];
[fSeedersField setStringValue: @""];
@ -249,25 +248,24 @@
int numberSelected = [fTorrents count];
if (numberSelected > 0)
{
float downloadRate = 0, uploadRate = 0, downloadedValid = 0;
//float downloadRate = 0, uploadRate = 0;
float downloadedValid = 0;
uint64_t downloadedTotal = 0, uploadedTotal = 0;
Torrent * torrent;
NSEnumerator * enumerator = [fTorrents objectEnumerator];
while ((torrent = [enumerator nextObject]))
{
downloadRate += [torrent downloadRate];
/*downloadRate += [torrent downloadRate];
uploadRate += [torrent uploadRate];
*/
downloadedValid += [torrent downloadedValid];
downloadedTotal += [torrent downloadedTotal];
uploadedTotal += [torrent uploadedTotal];
}
#if 0
/*
[fDownloadRateField setStringValue: [NSString stringForSpeed: downloadRate]];
[fUploadRateField setStringValue: [NSString stringForSpeed: uploadRate]];
#endif
*/
[fDownloadedValidField setStringValue: [NSString stringForFileSize: downloadedValid]];
[fDownloadedTotalField setStringValue: [NSString stringForFileSize: downloadedTotal]];
[fUploadedTotalField setStringValue: [NSString stringForFileSize: uploadedTotal]];
@ -275,13 +273,11 @@
if (numberSelected == 1)
{
torrent = [fTorrents objectAtIndex: 0];
#if 0
/*
[fStateField setStringValue: [torrent state]];
[fPercentField setStringValue: [NSString stringWithFormat:
@"%.2f%%", 100.0 * [torrent progress]]];
#endif
*/
int seeders = [torrent seeders], leechers = [torrent leechers];
[fSeedersField setStringValue: seeders < 0 ?
@"N/A" : [NSString stringWithInt: seeders]];