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