Changeset 12644


Ignore:
Timestamp:
Aug 8, 2011, 3:24:23 AM (10 years ago)
Author:
livings124
Message:

The Mac UI's "check for stalled transfers" feature now uses the libtransmission hooks

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r12635 r12644  
    307307        tr_bencDictAddBool(&settings, TR_PREFS_KEY_PEX_ENABLED, [fDefaults boolForKey: @"PEXGlobal"]);
    308308        tr_bencDictAddBool(&settings, TR_PREFS_KEY_PORT_FORWARDING, [fDefaults boolForKey: @"NatTraversal"]);
     309        tr_bencDictAddBool(&settings, TR_PREFS_KEY_QUEUE_STALLED_ENABLED, [fDefaults boolForKey: @"CheckStalled"]);
    309310        tr_bencDictAddInt(&settings, TR_PREFS_KEY_QUEUE_STALLED_MINUTES, [fDefaults integerForKey: @"StalledMinutes"]);
    310311        tr_bencDictAddReal(&settings, TR_PREFS_KEY_RATIO, [fDefaults floatForKey: @"RatioLimit"]);
  • trunk/macosx/PrefsController.m

    r12632 r12644  
    773773    tr_sessionSetQueueEnabled(fHandle, TR_UP, [fDefaults boolForKey: @"QueueSeed"]);
    774774   
     775    #warning any of these "UpdateQueue" needed?
    775776    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
    776777}
     
    790791- (void) setStalled: (id) sender
    791792{
    792 #warning do something here
     793    tr_sessionSetQueueStalledEnabled(fHandle, [fDefaults boolForKey: @"CheckStalled"]);
     794   
     795    //reload main table for stalled status
     796    #warning redundant?
     797    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
    793798   
    794799    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
     
    12561261    [fDefaults setInteger: seedQueueNum forKey: @"QueueSeedNumber"];
    12571262   
     1263    const BOOL checkStalled = tr_sessionGetQueueStalledEnabled(fHandle);
     1264    [fDefaults setBool: checkStalled forKey: @"CheckStalled"];
     1265   
    12581266    const int stalledMinutes = tr_sessionGetQueueStalledMinutes(fHandle);
    12591267    [fDefaults setInteger: stalledMinutes forKey: @"StalledMinutes"];
     
    13161324        [fQueueSeedField setIntValue: seedQueueNum];
    13171325       
     1326        //check stalled handled by bindings
    13181327        [fStalledField setIntValue: stalledMinutes];
    13191328    }
Note: See TracChangeset for help on using the changeset viewer.