Changeset 193


Ignore:
Timestamp:
Apr 4, 2006, 9:45:36 AM (16 years ago)
Author:
titer
Message:

Choosing the download location for torrents is smoother and doesn't
get added to the table until necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r191 r193  
    278278
    279279- (void) folderChoiceClosed: (NSOpenPanel *) s returnCode: (int) code
    280     contextInfo: (void *) info
    281 {
    282     Torrent * torrent = [fTorrents lastObject];
     280    contextInfo: (Torrent *) torrent
     281{
    283282    if (code == NSOKButton)
    284283    {
     284        [fTorrents addObject: torrent];
    285285        [torrent setFolder: [[s filenames] objectAtIndex: 0]];
    286286        [torrent start];
     
    308308        if( !torrent )
    309309            continue;
    310         [fTorrents addObject: torrent];
    311310
    312311        /* Add it to the "File > Open Recent" menu */
     
    316315        if( [downloadChoice isEqualToString: @"Constant"] )
    317316        {
     317            [fTorrents addObject: torrent];
    318318            [torrent setFolder: [downloadFolder stringByExpandingTildeInPath]];
    319319            [torrent start];
     
    321321        else if( [downloadChoice isEqualToString: @"Torrent"] )
    322322        {
     323            [fTorrents addObject: torrent];
    323324            [torrent setFolder: [torrentPath stringByDeletingLastPathComponent]];
    324325            [torrent start];
     
    342343                modalForWindow: fWindow modalDelegate: self didEndSelector:
    343344                @selector( folderChoiceClosed:returnCode:contextInfo: )
    344                 contextInfo: NULL];
     345                contextInfo: torrent];
    345346            [NSApp runModalForWindow: panel];
    346347        }
    347348    }
    348349
    349     [self updateUI: NULL];
     350    [self updateUI: nil];
    350351    [self updateTorrentHistory];
    351352}
Note: See TracChangeset for help on using the changeset viewer.