Changeset 2357


Ignore:
Timestamp:
Jul 15, 2007, 5:25:06 PM (15 years ago)
Author:
livings124
Message:

use peersConnected instead of peersTotal

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r2338 r2357  
    404404    if (active)
    405405    {
    406         int total = [torrent totalPeers];
     406        int total = [torrent totalPeersConnected];
    407407        NSString * connected = [NSString stringWithFormat:
    408408                                NSLocalizedString(@"%d Connected", "Inspector -> Peers tab -> peers"), total];
  • trunk/macosx/Torrent.h

    r2349 r2357  
    178178- (int) completedFromTracker;
    179179
    180 - (int) totalPeers;
     180- (int) totalPeersConnected;
    181181- (int) totalPeersTracker;
    182182- (int) totalPeersIncoming;
  • trunk/macosx/Torrent.m

    r2349 r2357  
    380380        case TR_STATUS_DOWNLOAD:
    381381            [statusString setString: @""];
    382             if ([self totalPeers] != 1)
     382            if ([self totalPeersConnected] != 1)
    383383                [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]];
    385385            else
    386386                [statusString appendFormat: NSLocalizedString(@"Downloading from %d of 1 peer",
     
    423423        case TR_STATUS_DONE:
    424424            [statusString setString: @""];
    425             if ([self totalPeers] != 1)
     425            if ([self totalPeersConnected] != 1)
    426426                [statusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peers", "Torrent -> status string"),
    427                                                 [self peersDownloading], [self totalPeers]];
     427                                                [self peersDownloading], [self totalPeersConnected]];
    428428            else
    429429                [statusString appendFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"),
     
    11081108{
    11091109    int totalPeers, i;
    1110     tr_peer_stat_t * peers = tr_torrentPeers(fHandle, & totalPeers);
     1110    tr_peer_stat_t * peers = tr_torrentPeers(fHandle, &totalPeers);
    11111111   
    11121112    NSMutableArray * peerDics = [NSMutableArray arrayWithCapacity: totalPeers];
     
    11811181}
    11821182
    1183 - (int) totalPeers
    1184 {
    1185     return fStat->peersTotal;
     1183- (int) totalPeersConnected
     1184{
     1185    return fStat->peersConnected;
    11861186}
    11871187
     
    17801780    //determine percentage finished and available
    17811781    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)
    17831783        avail = 0;
    17841784    else
Note: See TracChangeset for help on using the changeset viewer.