mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
The Mac UI's "check for stalled transfers" feature now uses the libtransmission hooks
This commit is contained in:
parent
aa3696b309
commit
a975fad0c7
2 changed files with 11 additions and 1 deletions
|
@ -306,6 +306,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
|
||||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_PEX_ENABLED, [fDefaults boolForKey: @"PEXGlobal"]);
|
||||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_PORT_FORWARDING, [fDefaults boolForKey: @"NatTraversal"]);
|
||||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_QUEUE_STALLED_ENABLED, [fDefaults boolForKey: @"CheckStalled"]);
|
||||
tr_bencDictAddInt(&settings, TR_PREFS_KEY_QUEUE_STALLED_MINUTES, [fDefaults integerForKey: @"StalledMinutes"]);
|
||||
tr_bencDictAddReal(&settings, TR_PREFS_KEY_RATIO, [fDefaults floatForKey: @"RatioLimit"]);
|
||||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_RATIO_ENABLED, [fDefaults boolForKey: @"RatioCheck"]);
|
||||
|
|
|
@ -772,6 +772,7 @@ tr_session * fHandle;
|
|||
tr_sessionSetQueueEnabled(fHandle, TR_DOWN, [fDefaults boolForKey: @"Queue"]);
|
||||
tr_sessionSetQueueEnabled(fHandle, TR_UP, [fDefaults boolForKey: @"QueueSeed"]);
|
||||
|
||||
#warning any of these "UpdateQueue" needed?
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
|
||||
}
|
||||
|
||||
|
@ -789,7 +790,11 @@ tr_session * fHandle;
|
|||
|
||||
- (void) setStalled: (id) sender
|
||||
{
|
||||
#warning do something here
|
||||
tr_sessionSetQueueStalledEnabled(fHandle, [fDefaults boolForKey: @"CheckStalled"]);
|
||||
|
||||
//reload main table for stalled status
|
||||
#warning redundant?
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
|
||||
}
|
||||
|
@ -1255,6 +1260,9 @@ tr_session * fHandle;
|
|||
const int seedQueueNum = tr_sessionGetQueueSize(fHandle, TR_UP);
|
||||
[fDefaults setInteger: seedQueueNum forKey: @"QueueSeedNumber"];
|
||||
|
||||
const BOOL checkStalled = tr_sessionGetQueueStalledEnabled(fHandle);
|
||||
[fDefaults setBool: checkStalled forKey: @"CheckStalled"];
|
||||
|
||||
const int stalledMinutes = tr_sessionGetQueueStalledMinutes(fHandle);
|
||||
[fDefaults setInteger: stalledMinutes forKey: @"StalledMinutes"];
|
||||
|
||||
|
@ -1315,6 +1323,7 @@ tr_session * fHandle;
|
|||
[fQueueDownloadField setIntValue: downloadQueueNum];
|
||||
[fQueueSeedField setIntValue: seedQueueNum];
|
||||
|
||||
//check stalled handled by bindings
|
||||
[fStalledField setIntValue: stalledMinutes];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue