Changeset 2357
- Timestamp:
- Jul 15, 2007, 5:25:06 PM (15 years ago)
- Location:
- trunk/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/InfoWindowController.m
r2338 r2357 404 404 if (active) 405 405 { 406 int total = [torrent totalPeers ];406 int total = [torrent totalPeersConnected]; 407 407 NSString * connected = [NSString stringWithFormat: 408 408 NSLocalizedString(@"%d Connected", "Inspector -> Peers tab -> peers"), total]; -
trunk/macosx/Torrent.h
r2349 r2357 178 178 - (int) completedFromTracker; 179 179 180 - (int) totalPeers ;180 - (int) totalPeersConnected; 181 181 - (int) totalPeersTracker; 182 182 - (int) totalPeersIncoming; -
trunk/macosx/Torrent.m
r2349 r2357 380 380 case TR_STATUS_DOWNLOAD: 381 381 [statusString setString: @""]; 382 if ([self totalPeers ] != 1)382 if ([self totalPeersConnected] != 1) 383 383 [statusString appendFormat: NSLocalizedString(@"Downloading from %d of %d peers", 384 "Torrent -> status string"), [self peersUploading], [self totalPeers ]];384 "Torrent -> status string"), [self peersUploading], [self totalPeersConnected]]; 385 385 else 386 386 [statusString appendFormat: NSLocalizedString(@"Downloading from %d of 1 peer", … … 423 423 case TR_STATUS_DONE: 424 424 [statusString setString: @""]; 425 if ([self totalPeers ] != 1)425 if ([self totalPeersConnected] != 1) 426 426 [statusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peers", "Torrent -> status string"), 427 [self peersDownloading], [self totalPeers ]];427 [self peersDownloading], [self totalPeersConnected]]; 428 428 else 429 429 [statusString appendFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"), … … 1108 1108 { 1109 1109 int totalPeers, i; 1110 tr_peer_stat_t * peers = tr_torrentPeers(fHandle, & 1110 tr_peer_stat_t * peers = tr_torrentPeers(fHandle, &totalPeers); 1111 1111 1112 1112 NSMutableArray * peerDics = [NSMutableArray arrayWithCapacity: totalPeers]; … … 1181 1181 } 1182 1182 1183 - (int) totalPeers 1184 { 1185 return fStat->peers Total;1183 - (int) totalPeersConnected 1184 { 1185 return fStat->peersConnected; 1186 1186 } 1187 1187 … … 1780 1780 //determine percentage finished and available 1781 1781 int have = rintf((float)MAX_PIECES * [self progress]), avail; 1782 if ([self progress] >= 1.0 || ![self isActive] || [self totalPeers ] <= 0)1782 if ([self progress] >= 1.0 || ![self isActive] || [self totalPeersConnected] <= 0) 1783 1783 avail = 0; 1784 1784 else
Note: See TracChangeset
for help on using the changeset viewer.