Changeset 714


Ignore:
Timestamp:
Aug 1, 2006, 11:09:33 PM (17 years ago)
Author:
livings124
Message:

New menu item to start all torrents waiting to start (in queue).

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r711 r714  
    101101- (void) resumeSelectedTorrents:    (id) sender;
    102102- (void) resumeAllTorrents:         (id) sender;
     103- (void) resumeWaitingTorrents:     (id) sender;
    103104- (void) resumeTorrents:            (NSArray *) torrents;
     105
    104106- (void) stopSelectedTorrents:      (id) sender;
    105107- (void) stopAllTorrents:           (id) sender;
  • trunk/macosx/Controller.m

    r712 r714  
    552552{
    553553    [self resumeTorrents: fTorrents];
     554}
     555
     556- (void) resumeWaitingTorrents: (id) sender
     557{
     558    NSMutableArray * torrents = [NSMutableArray arrayWithCapacity: [fTorrents count]];
     559   
     560    NSEnumerator * enumerator = [fTorrents objectEnumerator];
     561    Torrent * torrent;
     562    while ((torrent = [enumerator nextObject]))
     563        if ([torrent waitingToStart])
     564            [torrents addObject: torrent];
     565   
     566    [self resumeTorrents: torrents];
    554567}
    555568
     
    19251938    }
    19261939
    1927     //enable resume all item
    1928     if (action == @selector(resumeAllTorrents:))
    1929     {
    1930         Torrent * torrent;
    1931         NSEnumerator * enumerator = [fTorrents objectEnumerator];
    1932         while ((torrent = [enumerator nextObject]))
    1933             if ([torrent isPaused])
    1934                 return YES;
    1935         return NO;
    1936     }
    1937 
    1938     //enable pause all item
    1939     if (action == @selector(stopAllTorrents:))
    1940     {
    1941         Torrent * torrent;
    1942         NSEnumerator * enumerator = [fTorrents objectEnumerator];
    1943         while ((torrent = [enumerator nextObject]))
    1944             if ([torrent isActive])
    1945                 return YES;
    1946         return NO;
    1947     }
    1948 
    19491940    //enable reveal in finder
    19501941    if (action == @selector(revealFile:))
     
    19951986    }
    19961987
     1988    //enable pause all item
     1989    if (action == @selector(stopAllTorrents:))
     1990    {
     1991        Torrent * torrent;
     1992        NSEnumerator * enumerator = [fTorrents objectEnumerator];
     1993        while ((torrent = [enumerator nextObject]))
     1994            if ([torrent isActive])
     1995                return YES;
     1996        return NO;
     1997    }
     1998   
     1999    //enable resume all item
     2000    if (action == @selector(resumeAllTorrents:))
     2001    {
     2002        Torrent * torrent;
     2003        NSEnumerator * enumerator = [fTorrents objectEnumerator];
     2004        while ((torrent = [enumerator nextObject]))
     2005            if ([torrent isPaused])
     2006                return YES;
     2007        return NO;
     2008    }
     2009   
     2010    //enable resume waiting item
     2011    if (action == @selector(resumeWaitingTorrents:))
     2012    {
     2013        if (![[fDefaults stringForKey: @"StartSetting"] isEqualToString: @"Wait"])
     2014            return NO;
     2015   
     2016        Torrent * torrent;
     2017        NSEnumerator * enumerator = [fTorrents objectEnumerator];
     2018        while ((torrent = [enumerator nextObject]))
     2019            if ([torrent waitingToStart])
     2020                return YES;
     2021        return NO;
     2022    }
     2023
    19972024    //enable pause item
    19982025    if (action == @selector(stopSelectedTorrents:))
  • trunk/macosx/English.lproj/MainMenu.nib/classes.nib

    r693 r714  
    1616                resumeAllTorrents = id;
    1717                resumeSelectedTorrents = id;
     18                resumeWaitingTorrents = id;
    1819                revealFile = id;
    1920                setFilter = id;
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r700 r714  
    1212                <string>366 546 420 63 0 0 1152 842 </string>
    1313                <key>1603</key>
    14                 <string>337 544 477 67 0 0 1152 842 </string>
     14                <string>337 545 477 67 0 0 1152 842 </string>
    1515                <key>29</key>
    16                 <string>9 780 451 44 0 0 1152 842 </string>
     16                <string>207 725 451 44 0 0 1152 842 </string>
    1717                <key>456</key>
    1818                <string>396 374 216 206 0 0 1152 842 </string>
     
    3333        <array>
    3434                <integer>21</integer>
    35                 <integer>1603</integer>
     35                <integer>29</integer>
    3636        </array>
    3737        <key>IBSystem Version</key>
Note: See TracChangeset for help on using the changeset viewer.