Changeset 500


Ignore:
Timestamp:
Jul 2, 2006, 1:41:22 PM (16 years ago)
Author:
livings124
Message:

Remove a redundant variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r499 r500  
    995995        return;
    996996
    997     int desiredActive = [fDefaults integerForKey: @"WaitToStartNumber"], active = 0;
     997    int desiredActive = [fDefaults integerForKey: @"WaitToStartNumber"];
    998998   
    999999    NSEnumerator * enumerator = [fTorrents objectEnumerator];
     
    10011001    while ((torrent = [enumerator nextObject]))
    10021002    {
    1003         //ignore the torrent just stopped; for some reason it is not marked instantly as not active
     1003        //ignore the torrent just stopped
    10041004        if (torrent == finishedTorrent)
    10051005            continue;
     
    10091009            if (![torrent isSeeding])
    10101010            {
    1011                 active++;
    1012                 if (active >= desiredActive)
     1011                desiredActive--;
     1012                if (desiredActive <= 0)
    10131013                    return;
    10141014            }
     
    10271027    {
    10281028        [torrentToStart startTransfer];
     1029       
    10291030        [self updateUI: nil];
     1031        [self reloadInspector: nil];
     1032        [self updateTorrentHistory];
    10301033    }
    10311034}
     
    10351038    [self attemptToStartMultipleAuto: fTorrents];
    10361039   
    1037     [self updateUI: nil];
    1038     [self reloadInspector: nil];
    1039 }
    1040 
    1041 - (void) torrentStartSettingChange: (NSNotification *) notification
    1042 {
    1043     [self attemptToStartMultipleAuto: [notification object]];
    1044 
    10451040    [self updateUI: nil];
    10461041    [self reloadInspector: nil];
     
    10481043}
    10491044
     1045- (void) torrentStartSettingChange: (NSNotification *) notification
     1046{
     1047    [self attemptToStartMultipleAuto: [notification object]];
     1048
     1049    [self updateUI: nil];
     1050    [self reloadInspector: nil];
     1051    [self updateTorrentHistory];
     1052}
     1053
     1054- (void) attemptToStartAuto: (Torrent *) torrent
     1055{
     1056    [self attemptToStartMultipleAuto: [NSArray arrayWithObject: torrent]];
     1057}
     1058
    10501059//will try to start, taking into consideration the start preference
    1051 - (void) attemptToStartAuto: (Torrent *) torrent
    1052 {
    1053     [self attemptToStartMultipleAuto: [NSArray arrayWithObject: torrent]];
    1054 }
    1055 
    10561060- (void) attemptToStartMultipleAuto: (NSArray *) torrents
    10571061{
     
    10911095                                                    @"orderValue" ascending: YES] autorelease];
    10921096        NSArray * descriptors = [[NSArray alloc] initWithObjects: orderDescriptor, nil];
    1093                    
     1097       
    10941098        sortedTorrents = [torrents sortedArrayUsingDescriptors: descriptors];
    10951099        [descriptors release];
Note: See TracChangeset for help on using the changeset viewer.