Changeset 12618


Ignore:
Timestamp:
Aug 4, 2011, 12:36:02 AM (12 years ago)
Author:
livings124
Message:

update the main window when a torrent is auto-started from the queue

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r12614 r12618  
    12411241    /*for (Torrent * torrent in torrents)
    12421242        [torrent setWaitToStart: NO];*/
    1243 
    1244     [torrents makeObjectsPerformSelector: @selector(stopTransfer)];
     1243   
     1244    for (Torrent * torrent in torrents)
     1245        [torrent stopTransfer];
    12451246   
    12461247    [self updateTorrentsInQueue];
  • trunk/macosx/PrefsController.m

    r12612 r12618  
    642642    tr_sessionSetIdleLimit(fHandle, [fDefaults integerForKey: @"IdleLimitMinutes"]);
    643643   
     644    #warning reload main table for remaining seeding time
     645   
    644646    //reload global settings in inspector
    645647    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateGlobalOptions" object: nil];
  • trunk/macosx/Torrent.m

    r12614 r12618  
    4848- (void) sortFileList: (NSMutableArray *) fileNodes;
    4949
     50- (void) startQueue;
    5051- (void) completenessChange: (NSDictionary *) statusInfo;
    5152- (void) ratioLimitHit;
     
    5960
    6061@end
     62
     63void startQueueCallback(tr_torrent * torrent, void * torrentData)
     64{
     65    [(Torrent *)torrentData performSelectorOnMainThread: @selector(startQueue) withObject: nil waitUntilDone: NO];
     66}
    6167
    6268void completenessChangeCallback(tr_torrent * torrent, tr_completeness status, bool wasRunning, void * torrentData)
     
    159165            [self startTransferNoQueue];
    160166        }
    161        
    162         //fWaitToStart = waitToStart && [waitToStart boolValue];
    163        
    164167       
    165168        //upgrading from versions < 1.30: get old added, activity, and done dates
     
    16521655    fInfo = tr_torrentInfo(fHandle);
    16531656   
     1657    tr_torrentSetQueueStartCallback(fHandle, startQueueCallback, self);
    16541658    tr_torrentSetCompletenessCallback(fHandle, completenessChangeCallback, self);
    16551659    tr_torrentSetRatioLimitHitCallback(fHandle, ratioLimitHitCallback, self);
     
    17921796}
    17931797
     1798- (void) startQueue
     1799{
     1800    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
     1801}
     1802
    17941803//status has been retained
    17951804- (void) completenessChange: (NSDictionary *) statusInfo
Note: See TracChangeset for help on using the changeset viewer.