Show swarm speed in inspector.
This commit is contained in:
parent
86d9310274
commit
da555b7c6f
|
@ -39,6 +39,7 @@
|
|||
fSeedersField = NSTextField;
|
||||
fSizeField = NSTextField;
|
||||
fStateField = NSTextField;
|
||||
fSwarmSpeedField = NSTextField;
|
||||
fTabView = NSTabView;
|
||||
fTorrentLocationField = NSTextField;
|
||||
fTrackerField = NSTextField;
|
||||
|
|
Binary file not shown.
|
@ -44,7 +44,7 @@
|
|||
* fStateField,
|
||||
* fDownloadedValidField, * fDownloadedTotalField, * fUploadedTotalField,
|
||||
* fRatioField, * fSeedersField, * fLeechersField,
|
||||
* fConnectedPeersField, * fDownloadingFromField, * fUploadingToField;
|
||||
* fConnectedPeersField, * fDownloadingFromField, * fUploadingToField, * fSwarmSpeedField;
|
||||
|
||||
IBOutlet NSTableView * fPeerTable;
|
||||
IBOutlet NSTextField * fPeerTableStatusField;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
//15 spacing at the bottom of each tab
|
||||
#define TAB_INFO_HEIGHT 182.0
|
||||
#define TAB_ACTIVITY_HEIGHT 214.0
|
||||
#define TAB_ACTIVITY_HEIGHT 230.0
|
||||
#define TAB_PEERS_HEIGHT 255.0
|
||||
#define TAB_FILES_HEIGHT 255.0
|
||||
#define TAB_OPTIONS_HEIGHT 116.0
|
||||
|
@ -166,6 +166,7 @@
|
|||
[fConnectedPeersField setStringValue: @""];
|
||||
[fDownloadingFromField setStringValue: @""];
|
||||
[fUploadingToField setStringValue: @""];
|
||||
[fSwarmSpeedField setStringValue: @""];
|
||||
|
||||
[fPeers removeAllObjects];
|
||||
[fPeerTable reloadData];
|
||||
|
@ -267,6 +268,8 @@
|
|||
|
||||
[fRatioField setStringValue: [NSString stringForRatioWithDownload: downloadedTotal upload: uploadedTotal]];
|
||||
|
||||
[fSwarmSpeedField setStringValue: [torrent isActive] ? [NSString stringForSpeed: [torrent swarmSpeed]] : @""];
|
||||
|
||||
//set peers table
|
||||
[fPeers setArray: [torrent peers]];
|
||||
[fPeers sortUsingDescriptors: [self peerSortDescriptors]];
|
||||
|
|
|
@ -132,6 +132,7 @@
|
|||
- (float) downloadedValid;
|
||||
- (uint64_t) downloadedTotal;
|
||||
- (uint64_t) uploadedTotal;
|
||||
- (float) swarmSpeed;
|
||||
|
||||
- (NSNumber *) orderValue;
|
||||
- (void) setOrderValue: (int) orderValue;
|
||||
|
|
|
@ -612,6 +612,11 @@
|
|||
return fStat->uploaded;
|
||||
}
|
||||
|
||||
- (float) swarmSpeed
|
||||
{
|
||||
return fStat->swarmspeed;
|
||||
}
|
||||
|
||||
- (NSNumber *) orderValue
|
||||
{
|
||||
return [NSNumber numberWithInt: fOrderValue];
|
||||
|
|
Loading…
Reference in New Issue