Changeset 1553
- Timestamp:
- Mar 8, 2007, 8:15:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pex/macosx/InfoWindowController.m
r1550 r1553 386 386 if (active) 387 387 { 388 int left = [torrent totalPeers], count;389 NS MutableString * connected = [NSMutableString stringWithFormat:390 NSLocalizedString(@"%d Connected", "Inspector -> Peers tab -> peers"), left];391 392 if ( left> 0)388 int total = [torrent totalPeers]; 389 NSString * connected = [NSString stringWithFormat: 390 NSLocalizedString(@"%d Connected", "Inspector -> Peers tab -> peers"), total]; 391 392 if (total > 0) 393 393 { 394 [connected appendString: @": "]; 394 NSMutableArray * components = [NSMutableArray arrayWithCapacity: 4]; 395 int count; 395 396 if ((count = [torrent totalPeersTracker]) > 0) 396 { 397 [connected appendFormat: NSLocalizedString(@"%d tracker", "Inspector -> Peers tab -> peers"), count]; 398 if ((left -= count) > 0) 399 [connected appendString: @", "]; 400 } 401 if (left > 0 && (count = [torrent totalPeersIncoming]) > 0) 402 { 403 [connected appendFormat: NSLocalizedString(@"%d incoming", "Inspector -> Peers tab -> peers"), count]; 404 if ((left -= count) > 0) 405 [connected appendString: @", "]; 406 } 407 if (left > 0 && (count = [torrent totalPeersPex]) > 0) 408 { 409 [connected appendFormat: NSLocalizedString(@"%d PEX", "Inspector -> Peers tab -> peers"), count]; 410 if ((left -= count) > 0) 411 [connected appendString: @", "]; 412 } 413 if (left > 0 && (count = [torrent totalPeersCache]) > 0) 414 [connected appendFormat: NSLocalizedString(@"%d cache", "Inspector -> Peers tab -> peers"), count]; 397 [components addObject: [NSString stringWithFormat: 398 NSLocalizedString(@"%d tracker", "Inspector -> Peers tab -> peers"), count]]; 399 if ((count = [torrent totalPeersIncoming]) > 0) 400 [components addObject: [NSString stringWithFormat: 401 NSLocalizedString(@"%d incoming", "Inspector -> Peers tab -> peers"), count]]; 402 if ((count = [torrent totalPeersPex]) > 0) 403 [components addObject: [NSString stringWithFormat: 404 NSLocalizedString(@"%d PEX", "Inspector -> Peers tab -> peers"), count]]; 405 if ((count = [torrent totalPeersCache]) > 0) 406 [components addObject: [NSString stringWithFormat: 407 NSLocalizedString(@"%d cache", "Inspector -> Peers tab -> peers"), count]]; 408 409 connected = [NSString stringWithFormat: @"%@: %@", connected, [components componentsJoinedByString: @", "]]; 415 410 } 411 416 412 [fConnectedPeersField setStringValue: connected]; 417 413 }
Note: See TracChangeset
for help on using the changeset viewer.