Changeset 451


Ignore:
Timestamp:
Jun 23, 2006, 7:00:07 PM (16 years ago)
Author:
livings124
Message:

Checkbox for paused torrent to be in queue.

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/English.lproj/InfoWindow.nib/classes.nib

    r417 r451  
    99        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
    1010        {
    11             ACTIONS = {revealFile = id; setRatioCheck = id; setRatioLimit = id; };
     11            ACTIONS = {
     12                revealFile = id;
     13                setRatioCheck = id;
     14                setRatioLimit = id;
     15                setWaitToStart = id;
     16            };
    1217            CLASS = InfoWindowController;
    1318            LANGUAGE = ObjC;
     
    3742                fUploadedTotalField = NSTextField;
    3843                fUploadingToField = NSTextField;
     44                fWaitToStartButton = NSButton;
    3945            };
    4046            SUPERCLASS = NSWindowController;
  • trunk/macosx/InfoWindowController.h

    r431 r451  
    5252    IBOutlet NSMatrix * fRatioMatrix;
    5353    IBOutlet NSTextField * fRatioLimitField;
     54    IBOutlet NSButton * fWaitToStartButton;
    5455}
    5556
     
    6465- (void) setRatioLimit: (id) sender;
    6566
     67- (void) setWaitToStart: (id) sender;
     68
    6669@end
  • trunk/macosx/InfoWindowController.m

    r446 r451  
    3939
    4040//15 spacing at the bottom of each tab
    41 #define TAB_INFO_HEIGHT 185.0
    42 #define TAB_ACTIVITY_HEIGHT 199.0
    43 #define TAB_OPTIONS_HEIGHT 82.0
     41#define TAB_INFO_HEIGHT 182.0
     42#define TAB_ACTIVITY_HEIGHT 198.0
     43#define TAB_OPTIONS_HEIGHT 116.0
    4444#define TAB_FILES_HEIGHT 250.0
    4545
     
    191191    [fFileTable reloadData];
    192192   
     193    //set wait to start
     194    if (numberSelected == 1)
     195    {
     196        #warning make work for multiple torrents
     197        Torrent * torrent = [fTorrents objectAtIndex: 0];
     198        [fWaitToStartButton setState: [torrent waitingToStart]];
     199       
     200        [fWaitToStartButton setEnabled: ![torrent isActive] && [torrent progress] < 1.0
     201            && [[[NSUserDefaults standardUserDefaults] stringForKey: @"StartSetting"] isEqualToString: @"Wait"]];
     202    }
     203    else
     204    {
     205        [fWaitToStartButton setState: NSOffState];
     206        [fWaitToStartButton setEnabled: NO];
     207    }
     208   
    193209    //set ratio settings
    194210    if (numberSelected > 0)
     
    453469}
    454470
     471- (void) setWaitToStart: (id) sender
     472{
     473    BOOL wait = [sender state];
     474
     475    Torrent * torrent;
     476    NSEnumerator * enumerator = [fTorrents objectEnumerator];
     477    while ((torrent = [enumerator nextObject]))
     478        [torrent setWaitToStart: wait];
     479   
     480    [[NSNotificationCenter defaultCenter] postNotificationName: @"StartSettingChange" object: self];
     481}
     482
    455483@end
Note: See TracChangeset for help on using the changeset viewer.