Changeset 780 for trunk/macosx


Ignore:
Timestamp:
Aug 15, 2006, 12:59:44 AM (16 years ago)
Author:
livings124
Message:

Check for connected peers, as well as better peer table resizing behavior.

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.h

    r776 r780  
    3131    NSArray * fTorrents;
    3232    NSMutableArray * fPeers, * fFiles;
    33     NSImage * fAppIcon;
     33    NSImage * fAppIcon, * fCheckImage;
    3434   
    3535    IBOutlet NSTabView * fTabView;
  • trunk/macosx/InfoWindowController.m

    r776 r780  
    5757{
    5858    fAppIcon = [[NSApp applicationIconImage] copy];
     59    fCheckImage = [NSImage imageNamed: @"NSMenuCheckmark"];
    5960   
    6061    fTorrents = [[NSArray alloc] init];
     
    434435{
    435436    if (tableView == fPeerTable)
    436         return [fTorrents count] == 1 ? [[fTorrents objectAtIndex: 0] totalPeers] : 0;
     437        return [fPeers count];
    437438    else if (tableView == fFileTable)
    438439        return [fFiles count];
     
    448449        NSDictionary * peer = [fPeers objectAtIndex: row];
    449450       
    450         if ([ident isEqualToString: @"UL To"])
     451        if ([ident isEqualToString: @"Connected"])
     452            return [[peer objectForKey: @"Connected"] boolValue] ? fCheckImage : nil;
     453        else if ([ident isEqualToString: @"UL To"])
    451454            return [[peer objectForKey: @"UL To"] boolValue] ? @"Y" : @"";
    452455        else if ([ident isEqualToString: @"DL From"])
  • trunk/macosx/Torrent.m

    r775 r780  
    529529       
    530530        [peerDics addObject: [NSDictionary dictionaryWithObjectsAndKeys:
     531            [NSNumber numberWithBool: peer.isConnected], @"Connected",
    531532            [NSString stringWithCString: (char *) peer.addr encoding: NSUTF8StringEncoding], @"IP",
    532533            [NSString stringWithCString: (char *) peer.client encoding: NSUTF8StringEncoding], @"Client",
Note: See TracChangeset for help on using the changeset viewer.