Ignore:
Timestamp:
Dec 5, 2006, 12:14:52 AM (15 years ago)
Author:
livings124
Message:

initial support for announce-list (currently crashes when a tracker fails)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multitracker/macosx/InfoWindowController.m

    r1149 r1154  
    5050@interface InfoWindowController (Private)
    5151
     52- (void) updateInfoGeneral;
    5253- (void) updateInfoActivity;
    5354- (void) updateInfoPeers;
     
    204205        [fSizeField setStringValue: [NSString stringForFileSize: [torrent size]]];
    205206       
    206         NSString * tracker = [[torrent tracker] stringByAppendingString: [torrent announce]],
    207                 * hashString = [torrent hashString],
     207        NSString * hashString = [torrent hashString],
    208208                * commentString = [torrent comment];
    209         [fTrackerField setStringValue: tracker];
    210         [fTrackerField setToolTip: tracker];
    211209        [fPiecesField setStringValue: [NSString stringWithFormat: @"%d, %@", [torrent pieceCount],
    212210                                        [NSString stringForFileSize: [torrent pieceSize]]]];
     
    280278    else if ([[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_PEERS_IDENT])
    281279        [self updateInfoPeers];
     280    else if ([[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_INFO_IDENT])
     281        [self updateInfoGeneral];
    282282    else;
     283}
     284
     285- (void) updateInfoGeneral
     286{   
     287    int numberSelected = [fTorrents count];
     288    if (numberSelected != 1)
     289        return;
     290   
     291    Torrent * torrent = [fTorrents objectAtIndex: 0];
     292    NSString * tracker = [[torrent tracker] stringByAppendingString: [torrent announce]];
     293    [fTrackerField setStringValue: tracker];
     294    [fTrackerField setToolTip: tracker];
    283295}
    284296
Note: See TracChangeset for help on using the changeset viewer.