Changeset 1006 for trunk/macosx


Ignore:
Timestamp:
Oct 13, 2006, 6:58:12 PM (15 years ago)
Author:
livings124
Message:

in info show the number of incoming connections next to total connections

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r988 r1006  
    273273        BOOL active = [torrent isActive];
    274274       
    275         [fConnectedPeersField setStringValue: active ? [NSString stringWithInt: [torrent totalPeers]] : @""];
     275        [fConnectedPeersField setStringValue: active ? [NSString stringWithFormat: @"%d (%d incoming)",
     276                                                        [torrent totalPeers], [torrent totalPeersIncoming]]: @""];
    276277        [fDownloadingFromField setStringValue: active ? [NSString stringWithInt: [torrent peersUploading]] : @""];
    277278        [fUploadingToField setStringValue: active ? [NSString stringWithInt: [torrent peersDownloading]] : @""];
  • trunk/macosx/Torrent.h

    r998 r1006  
    135135- (int) leechers;
    136136- (int) totalPeers;
     137- (int) totalPeersIncoming;
     138- (int) totalPeersOutgoing;
    137139- (int) peersUploading;
    138140- (int) peersDownloading;
  • trunk/macosx/Torrent.m

    r998 r1006  
    682682{
    683683    return fStat->peersTotal;
     684}
     685
     686- (int) totalPeersIncoming
     687{
     688    return fStat->peersIncoming;
     689}
     690
     691- (int) totalPeersOutgoing
     692{
     693    return [self totalPeers] - [self totalPeersIncoming];
    684694}
    685695
Note: See TracChangeset for help on using the changeset viewer.