update Mac build for the change from inactive to idle
This commit is contained in:
parent
7a8e623301
commit
8bee7fa23c
|
@ -1116,11 +1116,11 @@ tr_sessionSetIdleLimited( tr_session * session, tr_bool isLimited )
|
|||
}
|
||||
|
||||
void
|
||||
tr_sessionSetIdleLimit( tr_session * session, uint16_t inactivityMinutes )
|
||||
tr_sessionSetIdleLimit( tr_session * session, uint16_t idleMinutes )
|
||||
{
|
||||
assert( tr_isSession( session ) );
|
||||
|
||||
session->idleLimitMinutes = inactivityMinutes;
|
||||
session->idleLimitMinutes = idleMinutes;
|
||||
}
|
||||
|
||||
tr_bool
|
||||
|
|
|
@ -432,7 +432,7 @@ tr_torrentCheckSeedLimit( tr_torrent * tor )
|
|||
/* if we're seeding and reach our inactiviy limit, stop the torrent */
|
||||
else if( tr_torrentIsSeedIdleLimitDone( tor ) )
|
||||
{
|
||||
tr_torinf( tor, "Seeding inactivity limit reached; pausing torrent" );
|
||||
tr_torinf( tor, "Seeding idle limit reached; pausing torrent" );
|
||||
|
||||
tor->isStopping = TRUE;
|
||||
|
||||
|
@ -1141,7 +1141,7 @@ tr_torrentStat( tr_torrent * tor )
|
|||
s->ratio = tr_getRatio( s->uploadedEver,
|
||||
s->downloadedEver ? s->downloadedEver : s->haveValid );
|
||||
|
||||
#warning account for inactivity limit?
|
||||
#warning account for idle limit?
|
||||
seedRatioApplies = tr_torrentGetSeedRatioBytes( tor, &seedRatioBytesLeft,
|
||||
&seedRatioBytesGoal );
|
||||
|
||||
|
@ -1169,7 +1169,7 @@ tr_torrentStat( tr_torrent * tor )
|
|||
break;
|
||||
|
||||
case TR_STATUS_SEED: {
|
||||
#warning do something for inactivity?
|
||||
#warning do something for idle?
|
||||
if( !seedRatioApplies )
|
||||
s->eta = TR_ETA_NOT_AVAIL;
|
||||
else {
|
||||
|
@ -1192,7 +1192,7 @@ tr_torrentStat( tr_torrent * tor )
|
|||
break;
|
||||
}
|
||||
|
||||
#warning (maybe) do something for inactivity?
|
||||
#warning (maybe) do something for idle?
|
||||
/* s->haveValid is here to make sure a torrent isn't marked 'finished'
|
||||
* when the user hits "uncheck all" prior to starting the torrent... */
|
||||
s->finished = seedRatioApplies && !seedRatioBytesLeft && s->haveValid;
|
||||
|
@ -1782,7 +1782,7 @@ tr_torrentClearRatioLimitHitCallback( tr_torrent * torrent )
|
|||
tr_torrentSetRatioLimitHitCallback( torrent, NULL, NULL );
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
tr_torrentSetIdleLimitHitCallback( tr_torrent * tor,
|
||||
tr_torrent_idle_limit_hit_func func,
|
||||
void * user_data )
|
||||
|
|
|
@ -1376,13 +1376,13 @@ void tr_torrentSetRatioLimitHitCallback(
|
|||
void tr_torrentClearRatioLimitHitCallback( tr_torrent * torrent );
|
||||
|
||||
/**
|
||||
* Register to be notified whenever a torrent's inactivity limit
|
||||
* Register to be notified whenever a torrent's idle limit
|
||||
* has been hit. This will be called when the seeding torrent's
|
||||
* idle time has met or exceeded the designated inactivity limit.
|
||||
* idle time has met or exceeded the designated idle limit.
|
||||
*
|
||||
* Has the same restrictions as tr_torrentSetCompletenessCallback
|
||||
*/
|
||||
void tr_torrentSetInactivityLimitHitCallback(
|
||||
void tr_torrentSetIdleLimitHitCallback(
|
||||
tr_torrent * torrent,
|
||||
tr_torrent_idle_limit_hit_func func,
|
||||
void * user_data );
|
||||
|
|
|
@ -298,8 +298,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_DHT_ENABLED, [fDefaults boolForKey: @"DHTGlobal"]);
|
||||
tr_bencDictAddStr(&settings, TR_PREFS_KEY_DOWNLOAD_DIR, [[[fDefaults stringForKey: @"DownloadFolder"]
|
||||
stringByExpandingTildeInPath] UTF8String]);
|
||||
tr_bencDictAddInt(&settings, TR_PREFS_KEY_INACTIVE_LIMIT, [fDefaults integerForKey: @"InactiveLimitMinutes"]);
|
||||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_INACTIVE_LIMIT_ENABLED, [fDefaults boolForKey: @"InactiveLimitCheck"]);
|
||||
tr_bencDictAddInt(&settings, TR_PREFS_KEY_IDLE_LIMIT, [fDefaults integerForKey: @"IdleLimitMinutes"]);
|
||||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_IDLE_LIMIT_ENABLED, [fDefaults boolForKey: @"IdleLimitCheck"]);
|
||||
tr_bencDictAddStr(&settings, TR_PREFS_KEY_INCOMPLETE_DIR, [[[fDefaults stringForKey: @"IncompleteDownloadFolder"]
|
||||
stringByExpandingTildeInPath] UTF8String]);
|
||||
tr_bencDictAddBool(&settings, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, [fDefaults boolForKey: @"UseIncompleteDownloadFolder"]);
|
||||
|
|
|
@ -76,9 +76,9 @@
|
|||
<integer>-2</integer>
|
||||
<key>FilterSearchType</key>
|
||||
<string>Name</string>
|
||||
<key>InactiveLimitCheck</key>
|
||||
<key>IdleLimitCheck</key>
|
||||
<false/>
|
||||
<key>InactiveLimitMinutes</key>
|
||||
<key>IdleLimitMinutes</key>
|
||||
<integer>30</integer>
|
||||
<key>IncompleteDownloadFolder</key>
|
||||
<string>~/Downloads</string>
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
|
||||
BOOL fSet;
|
||||
|
||||
IBOutlet NSPopUpButton * fPriorityPopUp, * fRatioPopUp, * fInactivePopUp;
|
||||
IBOutlet NSPopUpButton * fPriorityPopUp, * fRatioPopUp, * fIdlePopUp;
|
||||
IBOutlet NSButton * fUploadLimitCheck, * fDownloadLimitCheck, * fGlobalLimitCheck;
|
||||
IBOutlet NSTextField * fUploadLimitField, * fDownloadLimitField, * fRatioLimitField, * fInactiveLimitField,
|
||||
* fUploadLimitLabel, * fDownloadLimitLabel, * fInactiveLimitLabel, * fPeersConnectLabel, * fPeersConnectField;
|
||||
IBOutlet NSTextField * fUploadLimitField, * fDownloadLimitField, * fRatioLimitField, * fIdleLimitField,
|
||||
* fUploadLimitLabel, * fDownloadLimitLabel, * fIdleLimitLabel, * fPeersConnectLabel, * fPeersConnectField;
|
||||
|
||||
NSString * fInitialString;
|
||||
}
|
||||
|
@ -50,8 +50,8 @@
|
|||
- (void) setRatioSetting: (id) sender;
|
||||
- (void) setRatioLimit: (id) sender;
|
||||
|
||||
- (void) setInactiveSetting: (id) sender;
|
||||
- (void) setInactiveLimit: (id) sender;
|
||||
- (void) setIdleSetting: (id) sender;
|
||||
- (void) setIdleLimit: (id) sender;
|
||||
|
||||
- (void) setPriority: (id) sender;
|
||||
|
||||
|
|
|
@ -139,16 +139,16 @@
|
|||
[fGlobalLimitCheck setState: globalUseSpeedLimit];
|
||||
[fGlobalLimitCheck setEnabled: YES];
|
||||
|
||||
//get ratio and inactive info
|
||||
//get ratio and idle info
|
||||
enumerator = [fTorrents objectEnumerator];
|
||||
torrent = [enumerator nextObject]; //first torrent
|
||||
|
||||
NSInteger checkRatio = [torrent ratioSetting], checkInactive = [torrent inactiveSetting];
|
||||
NSInteger checkRatio = [torrent ratioSetting], checkIdle = [torrent idleSetting];
|
||||
CGFloat ratioLimit = [torrent ratioLimit];
|
||||
NSUInteger inactiveLimit = [torrent inactiveLimitMinutes];
|
||||
NSUInteger idleLimit = [torrent idleLimitMinutes];
|
||||
|
||||
while ((torrent = [enumerator nextObject])
|
||||
&& (checkRatio != INVALID || ratioLimit != INVALID || checkInactive != INVALID || inactiveLimit != INVALID))
|
||||
&& (checkRatio != INVALID || ratioLimit != INVALID || checkIdle != INVALID || idleLimit != INVALID))
|
||||
{
|
||||
if (checkRatio != INVALID && checkRatio != [torrent ratioSetting])
|
||||
checkRatio = INVALID;
|
||||
|
@ -156,11 +156,11 @@
|
|||
if (ratioLimit != INVALID && ratioLimit != [torrent ratioLimit])
|
||||
ratioLimit = INVALID;
|
||||
|
||||
if (checkInactive != INVALID && checkInactive != [torrent inactiveSetting])
|
||||
checkInactive = INVALID;
|
||||
if (checkIdle != INVALID && checkIdle != [torrent idleSetting])
|
||||
checkIdle = INVALID;
|
||||
|
||||
if (inactiveLimit != INVALID && inactiveLimit != [torrent inactiveLimitMinutes])
|
||||
inactiveLimit = INVALID;
|
||||
if (idleLimit != INVALID && idleLimit != [torrent idleLimitMinutes])
|
||||
idleLimit = INVALID;
|
||||
}
|
||||
|
||||
//set ratio view
|
||||
|
@ -182,24 +182,24 @@
|
|||
else
|
||||
[fRatioLimitField setStringValue: @""];
|
||||
|
||||
//set inactive view
|
||||
if (checkInactive == TR_INACTIVELIMIT_SINGLE)
|
||||
//set idle view
|
||||
if (checkIdle == TR_IDLELIMIT_SINGLE)
|
||||
index = OPTION_POPUP_LIMIT;
|
||||
else if (checkInactive == TR_INACTIVELIMIT_UNLIMITED)
|
||||
else if (checkIdle == TR_IDLELIMIT_UNLIMITED)
|
||||
index = OPTION_POPUP_NO_LIMIT;
|
||||
else if (checkInactive == TR_INACTIVELIMIT_GLOBAL)
|
||||
else if (checkIdle == TR_IDLELIMIT_GLOBAL)
|
||||
index = OPTION_POPUP_GLOBAL;
|
||||
else
|
||||
index = -1;
|
||||
[fInactivePopUp selectItemAtIndex: index];
|
||||
[fInactivePopUp setEnabled: YES];
|
||||
[fIdlePopUp selectItemAtIndex: index];
|
||||
[fIdlePopUp setEnabled: YES];
|
||||
|
||||
[fInactiveLimitField setHidden: checkInactive != TR_INACTIVELIMIT_SINGLE];
|
||||
if (inactiveLimit != INVALID)
|
||||
[fInactiveLimitField setIntegerValue: inactiveLimit];
|
||||
[fIdleLimitField setHidden: checkIdle != TR_IDLELIMIT_SINGLE];
|
||||
if (idleLimit != INVALID)
|
||||
[fIdleLimitField setIntegerValue: idleLimit];
|
||||
else
|
||||
[fInactiveLimitField setStringValue: @""];
|
||||
[fInactiveLimitLabel setHidden: checkInactive != TR_INACTIVELIMIT_SINGLE];
|
||||
[fIdleLimitField setStringValue: @""];
|
||||
[fIdleLimitLabel setHidden: checkIdle != TR_IDLELIMIT_SINGLE];
|
||||
|
||||
//get priority info
|
||||
enumerator = [fTorrents objectEnumerator];
|
||||
|
@ -331,45 +331,45 @@
|
|||
[torrent setRatioLimit: limit];
|
||||
}
|
||||
|
||||
- (void) setInactiveSetting: (id) sender
|
||||
- (void) setIdleSetting: (id) sender
|
||||
{
|
||||
NSInteger setting;
|
||||
bool single = NO;
|
||||
switch ([sender indexOfSelectedItem])
|
||||
{
|
||||
case OPTION_POPUP_LIMIT:
|
||||
setting = TR_INACTIVELIMIT_SINGLE;
|
||||
setting = TR_IDLELIMIT_SINGLE;
|
||||
single = YES;
|
||||
break;
|
||||
case OPTION_POPUP_NO_LIMIT:
|
||||
setting = TR_INACTIVELIMIT_UNLIMITED;
|
||||
setting = TR_IDLELIMIT_UNLIMITED;
|
||||
break;
|
||||
case OPTION_POPUP_GLOBAL:
|
||||
setting = TR_INACTIVELIMIT_GLOBAL;
|
||||
setting = TR_IDLELIMIT_GLOBAL;
|
||||
break;
|
||||
default:
|
||||
NSAssert1(NO, @"Unknown option selected in inactive popup: %d", [sender indexOfSelectedItem]);
|
||||
NSAssert1(NO, @"Unknown option selected in idle popup: %d", [sender indexOfSelectedItem]);
|
||||
return;
|
||||
}
|
||||
|
||||
for (Torrent * torrent in fTorrents)
|
||||
[torrent setInactiveSetting: setting];
|
||||
[torrent setIdleSetting: setting];
|
||||
|
||||
[fInactiveLimitField setHidden: !single];
|
||||
[fInactiveLimitLabel setHidden: !single];
|
||||
[fIdleLimitField setHidden: !single];
|
||||
[fIdleLimitLabel setHidden: !single];
|
||||
if (single)
|
||||
{
|
||||
[fInactiveLimitField selectText: self];
|
||||
[fIdleLimitField selectText: self];
|
||||
[[[self view] window] makeKeyAndOrderFront: self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setInactiveLimit: (id) sender
|
||||
- (void) setIdleLimit: (id) sender
|
||||
{
|
||||
const NSUInteger limit = [sender integerValue];
|
||||
|
||||
for (Torrent * torrent in fTorrents)
|
||||
[torrent setInactiveLimitMinutes: limit];
|
||||
[torrent setIdleLimitMinutes: limit];
|
||||
}
|
||||
|
||||
- (void) setPriority: (id) sender
|
||||
|
@ -456,11 +456,11 @@
|
|||
[fRatioLimitField setHidden: YES];
|
||||
[fRatioLimitField setStringValue: @""];
|
||||
|
||||
[fInactivePopUp setEnabled: NO];
|
||||
[fInactivePopUp selectItemAtIndex: -1];
|
||||
[fInactiveLimitField setHidden: YES];
|
||||
[fInactiveLimitField setStringValue: @""];
|
||||
[fInactiveLimitLabel setHidden: YES];
|
||||
[fIdlePopUp setEnabled: NO];
|
||||
[fIdlePopUp selectItemAtIndex: -1];
|
||||
[fIdleLimitField setHidden: YES];
|
||||
[fIdleLimitField setStringValue: @""];
|
||||
[fIdleLimitLabel setHidden: YES];
|
||||
|
||||
[fPeersConnectField setEnabled: NO];
|
||||
[fPeersConnectField setStringValue: @""];
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
NSString * fInitialString;
|
||||
|
||||
IBOutlet NSPopUpButton * fFolderPopUp, * fIncompleteFolderPopUp, * fImportFolderPopUp;
|
||||
IBOutlet NSTextField * fRatioStopField, * fInactiveStopField, * fQueueDownloadField, * fQueueSeedField, * fStalledField;
|
||||
IBOutlet NSTextField * fRatioStopField, * fIdleStopField, * fQueueDownloadField, * fQueueSeedField, * fStalledField;
|
||||
|
||||
IBOutlet NSTextField * fUploadField, * fDownloadField,
|
||||
* fSpeedLimitUploadField, * fSpeedLimitDownloadField;
|
||||
|
@ -118,8 +118,8 @@
|
|||
- (void) setRatioStop: (id) sender;
|
||||
- (void) updateRatioStopField;
|
||||
|
||||
- (void) applyInactiveStopSetting: (id) sender;
|
||||
- (void) setInactiveStop: (id) sender;
|
||||
- (void) applyIdleStopSetting: (id) sender;
|
||||
- (void) setIdleStop: (id) sender;
|
||||
|
||||
- (void) applySpeedSettings: (id) sender;
|
||||
- (void) applyAltSpeedSettings;
|
||||
|
|
|
@ -183,8 +183,8 @@ tr_session * fHandle;
|
|||
//set stop ratio
|
||||
[fRatioStopField setFloatValue: [fDefaults floatForKey: @"RatioLimit"]];
|
||||
|
||||
//set inactive seeding minutes
|
||||
[fInactiveStopField setIntegerValue: [fDefaults integerForKey: @"InactiveLimitMinutes"]];
|
||||
//set idle seeding minutes
|
||||
[fIdleStopField setIntegerValue: [fDefaults integerForKey: @"IdleLimitMinutes"]];
|
||||
|
||||
//set limits
|
||||
[self updateLimitFields];
|
||||
|
@ -611,17 +611,17 @@ tr_session * fHandle;
|
|||
[self applyRatioSetting: nil];
|
||||
}
|
||||
|
||||
- (void) applyInactiveStopSetting: (id) sender
|
||||
- (void) applyIdleStopSetting: (id) sender
|
||||
{
|
||||
tr_sessionSetInactivityLimited(fHandle, [fDefaults boolForKey: @"InactiveLimitCheck"]);
|
||||
tr_sessionSetInactiveLimit(fHandle, [fDefaults integerForKey: @"InactiveLimitMinutes"]);
|
||||
tr_sessionSetIdleLimited(fHandle, [fDefaults boolForKey: @"IdleLimitCheck"]);
|
||||
tr_sessionSetIdleLimit(fHandle, [fDefaults integerForKey: @"IdleLimitMinutes"]);
|
||||
}
|
||||
|
||||
- (void) setInactiveStop: (id) sender
|
||||
- (void) setIdleStop: (id) sender
|
||||
{
|
||||
[fDefaults setInteger: [sender integerValue] forKey: @"InactiveLimitMinutes"];
|
||||
[fDefaults setInteger: [sender integerValue] forKey: @"IdleLimitMinutes"];
|
||||
|
||||
[self applyInactiveStopSetting: nil];
|
||||
[self applyIdleStopSetting: nil];
|
||||
}
|
||||
|
||||
- (void) updateLimitFields
|
||||
|
@ -1241,12 +1241,12 @@ tr_session * fHandle;
|
|||
const float ratioLimit = tr_sessionGetRatioLimit(fHandle);
|
||||
[fDefaults setFloat: ratioLimit forKey: @"RatioLimit"];
|
||||
|
||||
//inactive seed limit
|
||||
const BOOL inactivityLimited = tr_sessionIsInactivityLimited(fHandle);
|
||||
[fDefaults setBool: inactivityLimited forKey: @"InactiveLimitCheck"];
|
||||
//Idle seed limit
|
||||
const BOOL idleLimited = tr_sessionIsIdleLimited(fHandle);
|
||||
[fDefaults setBool: idleLimited forKey: @"IdleLimitCheck"];
|
||||
|
||||
const NSUInteger inactiveLimitMin = tr_sessionGetInactiveLimit(fHandle);
|
||||
[fDefaults setInteger: inactiveLimitMin forKey: @"InactiveLimitMinutes"];
|
||||
const NSUInteger idleLimitMin = tr_sessionGetIdleLimit(fHandle);
|
||||
[fDefaults setInteger: idleLimitMin forKey: @"IdleLimitMinutes"];
|
||||
|
||||
//update gui if loaded
|
||||
if (fHasLoaded)
|
||||
|
@ -1287,8 +1287,8 @@ tr_session * fHandle;
|
|||
//ratio limit enabled handled by bindings
|
||||
[fRatioStopField setFloatValue: ratioLimit];
|
||||
|
||||
//inactivity limit enabled handled by bindings
|
||||
[fInactiveStopField setIntegerValue: inactiveLimitMin];
|
||||
//idle limit enabled handled by bindings
|
||||
[fIdleStopField setIntegerValue: idleLimitMin];
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"SpeedLimitUpdate" object: nil];
|
||||
|
|
|
@ -98,11 +98,11 @@
|
|||
- (BOOL) seedRatioSet;
|
||||
- (CGFloat) progressStopRatio;
|
||||
|
||||
- (tr_inactivelimit) inactiveSetting;
|
||||
- (void) setInactiveSetting: (tr_inactivelimit) setting;
|
||||
- (NSUInteger) inactiveLimitMinutes;
|
||||
- (void) setInactiveLimitMinutes: (NSUInteger) limit;
|
||||
- (BOOL) seedInactiveLimitSet;
|
||||
- (tr_idlelimit) idleSetting;
|
||||
- (void) setIdleSetting: (tr_idlelimit) setting;
|
||||
- (NSUInteger) idleLimitMinutes;
|
||||
- (void) setIdleLimitMinutes: (NSUInteger) limit;
|
||||
- (BOOL) seedIdleLimitSet;
|
||||
|
||||
- (BOOL) usesSpeedLimit: (BOOL) upload;
|
||||
- (void) setUseSpeedLimit: (BOOL) use upload: (BOOL) upload;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
- (void) completenessChange: (NSDictionary *) statusInfo;
|
||||
- (void) ratioLimitHit;
|
||||
- (void) inactiveLimitHit;
|
||||
- (void) idleLimitHit;
|
||||
- (void) metadataRetrieved;
|
||||
|
||||
- (NSString *) etaString;
|
||||
|
@ -66,9 +66,9 @@ void ratioLimitHitCallback(tr_torrent * torrent, void * torrentData)
|
|||
[(Torrent *)torrentData performSelectorOnMainThread: @selector(ratioLimitHit) withObject: nil waitUntilDone: NO];
|
||||
}
|
||||
|
||||
void inactiveLimitHitCallback(tr_torrent * torrent, void * torrentData)
|
||||
void idleLimitHitCallback(tr_torrent * torrent, void * torrentData)
|
||||
{
|
||||
[(Torrent *)torrentData performSelectorOnMainThread: @selector(inactiveLimitHit) withObject: nil waitUntilDone: NO];
|
||||
[(Torrent *)torrentData performSelectorOnMainThread: @selector(idleLimitHit) withObject: nil waitUntilDone: NO];
|
||||
}
|
||||
|
||||
void metadataCallback(tr_torrent * torrent, void * torrentData)
|
||||
|
@ -393,30 +393,30 @@ int trashDataFile(const char * filename)
|
|||
return fStat->seedRatioPercentDone;
|
||||
}
|
||||
|
||||
- (tr_inactivelimit) inactiveSetting
|
||||
- (tr_idlelimit) idleSetting
|
||||
{
|
||||
return tr_torrentGetInactiveMode(fHandle);
|
||||
return tr_torrentGetIdleMode(fHandle);
|
||||
}
|
||||
|
||||
- (void) setInactiveSetting: (tr_inactivelimit) setting
|
||||
- (void) setIdleSetting: (tr_idlelimit) setting
|
||||
{
|
||||
tr_torrentSetInactiveMode(fHandle, setting);
|
||||
tr_torrentSetIdleMode(fHandle, setting);
|
||||
}
|
||||
|
||||
- (NSUInteger) inactiveLimitMinutes
|
||||
- (NSUInteger) idleLimitMinutes
|
||||
{
|
||||
return tr_torrentGetInactiveLimit(fHandle);
|
||||
return tr_torrentGetIdleLimit(fHandle);
|
||||
}
|
||||
|
||||
- (void) setInactiveLimitMinutes: (NSUInteger) limit
|
||||
- (void) setIdleLimitMinutes: (NSUInteger) limit
|
||||
{
|
||||
NSAssert(limit > 0, @"Inactive limit must be greater than zero");
|
||||
tr_torrentSetInactiveLimit(fHandle, limit);
|
||||
NSAssert(limit > 0, @"Idle limit must be greater than zero");
|
||||
tr_torrentSetIdleLimit(fHandle, limit);
|
||||
}
|
||||
|
||||
- (BOOL) seedInactiveLimitSet
|
||||
- (BOOL) seedIdleLimitSet
|
||||
{
|
||||
return tr_torrentGetSeedInactive(fHandle, NULL);
|
||||
return tr_torrentGetSeedIdle(fHandle, NULL);
|
||||
}
|
||||
|
||||
- (BOOL) usesSpeedLimit: (BOOL) upload
|
||||
|
@ -1646,7 +1646,7 @@ int trashDataFile(const char * filename)
|
|||
|
||||
tr_torrentSetCompletenessCallback(fHandle, completenessChangeCallback, self);
|
||||
tr_torrentSetRatioLimitHitCallback(fHandle, ratioLimitHitCallback, self);
|
||||
tr_torrentSetInactiveLimitHitCallback(fHandle, inactiveLimitHitCallback, self);
|
||||
tr_torrentSetIdleLimitHitCallback(fHandle, idleLimitHitCallback, self);
|
||||
tr_torrentSetMetadataCallback(fHandle, metadataCallback, self);
|
||||
|
||||
fHashString = [[NSString alloc] initWithUTF8String: fInfo->hashString];
|
||||
|
@ -1802,7 +1802,7 @@ int trashDataFile(const char * filename)
|
|||
[[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentStoppedForRatio" object: self];
|
||||
}
|
||||
|
||||
- (void) inactiveLimitHit
|
||||
- (void) idleLimitHit
|
||||
{
|
||||
fStat = tr_torrentStat(fHandle);
|
||||
|
||||
|
|
|
@ -1134,43 +1134,43 @@
|
|||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">fInactivePopUp</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="110760088"/>
|
||||
</object>
|
||||
<int key="connectionID">93</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">fInactiveLimitField</string>
|
||||
<string key="label">fIdleLimitField</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="317277208"/>
|
||||
</object>
|
||||
<int key="connectionID">94</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">setInactiveLimit:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="317277208"/>
|
||||
</object>
|
||||
<int key="connectionID">95</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">setInactiveSetting:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="110760088"/>
|
||||
</object>
|
||||
<int key="connectionID">96</int>
|
||||
<int key="connectionID">102</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">fInactiveLimitLabel</string>
|
||||
<string key="label">fIdleLimitLabel</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="706967535"/>
|
||||
</object>
|
||||
<int key="connectionID">101</int>
|
||||
<int key="connectionID">103</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">fIdlePopUp</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="110760088"/>
|
||||
</object>
|
||||
<int key="connectionID">104</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">setIdleLimit:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="317277208"/>
|
||||
</object>
|
||||
<int key="connectionID">105</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">setIdleSetting:</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="110760088"/>
|
||||
</object>
|
||||
<int key="connectionID">106</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
|
@ -1930,7 +1930,7 @@
|
|||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">101</int>
|
||||
<int key="maxID">106</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
@ -1950,8 +1950,8 @@
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>setInactiveLimit:</string>
|
||||
<string>setInactiveSetting:</string>
|
||||
<string>setIdleLimit:</string>
|
||||
<string>setIdleSetting:</string>
|
||||
<string>setPeersConnectLimit:</string>
|
||||
<string>setPriority:</string>
|
||||
<string>setRatioLimit:</string>
|
||||
|
@ -1981,10 +1981,11 @@
|
|||
<string>fDownloadLimitField</string>
|
||||
<string>fDownloadLimitLabel</string>
|
||||
<string>fGlobalLimitCheck</string>
|
||||
<string>fInactiveLimitField</string>
|
||||
<string>fInactiveLimitLabel</string>
|
||||
<string>fInactivePopUp</string>
|
||||
<string>fIdleLimitField</string>
|
||||
<string>fIdleLimitLabel</string>
|
||||
<string>fIdlePopUp</string>
|
||||
<string>fPeersConnectField</string>
|
||||
<string>fPeersConnectLabel</string>
|
||||
<string>fPriorityPopUp</string>
|
||||
<string>fRatioLimitField</string>
|
||||
<string>fRatioPopUp</string>
|
||||
|
@ -2002,6 +2003,7 @@
|
|||
<string>NSTextField</string>
|
||||
<string>NSPopUpButton</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSPopUpButton</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSPopUpButton</string>
|
||||
|
|
|
@ -4656,6 +4656,10 @@ AAABAAAAAQ</bytes>
|
|||
<string key="NSExtension">NSResponder</string>
|
||||
</object>
|
||||
<object class="NSUserDefaultsController" id="356871564">
|
||||
<object class="NSMutableArray" key="NSDeclaredKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>IdleLimitCheck</string>
|
||||
</object>
|
||||
<bool key="NSSharedInstance">YES</bool>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="981493640">
|
||||
|
@ -8056,61 +8060,61 @@ AAABAAAAAQ</bytes>
|
|||
</object>
|
||||
<int key="connectionID">1971</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">fIdleStopField</string>
|
||||
<reference key="source" ref="511492310"/>
|
||||
<reference key="destination" ref="430240209"/>
|
||||
</object>
|
||||
<int key="connectionID">1979</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">applyInactiveStopSetting:</string>
|
||||
<string key="label">applyIdleStopSetting:</string>
|
||||
<reference key="source" ref="511492310"/>
|
||||
<reference key="destination" ref="457261886"/>
|
||||
</object>
|
||||
<int key="connectionID">1972</int>
|
||||
<int key="connectionID">1980</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">setIdleStop:</string>
|
||||
<reference key="source" ref="511492310"/>
|
||||
<reference key="destination" ref="430240209"/>
|
||||
</object>
|
||||
<int key="connectionID">1981</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">value: values.InactiveLimitCheck</string>
|
||||
<string key="label">value: values.IdleLimitCheck</string>
|
||||
<reference key="source" ref="457261886"/>
|
||||
<reference key="destination" ref="356871564"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="457261886"/>
|
||||
<reference key="NSDestination" ref="356871564"/>
|
||||
<string key="NSLabel">value: values.InactiveLimitCheck</string>
|
||||
<string key="NSLabel">value: values.IdleLimitCheck</string>
|
||||
<string key="NSBinding">value</string>
|
||||
<string key="NSKeyPath">values.InactiveLimitCheck</string>
|
||||
<string key="NSKeyPath">values.IdleLimitCheck</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">1973</int>
|
||||
<int key="connectionID">1982</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">enabled: values.InactiveLimitCheck</string>
|
||||
<string key="label">enabled: values.IdleLimitCheck</string>
|
||||
<reference key="source" ref="430240209"/>
|
||||
<reference key="destination" ref="356871564"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="430240209"/>
|
||||
<reference key="NSDestination" ref="356871564"/>
|
||||
<string key="NSLabel">enabled: values.InactiveLimitCheck</string>
|
||||
<string key="NSLabel">enabled: values.IdleLimitCheck</string>
|
||||
<string key="NSBinding">enabled</string>
|
||||
<string key="NSKeyPath">values.InactiveLimitCheck</string>
|
||||
<string key="NSKeyPath">values.IdleLimitCheck</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">1974</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">setInactiveStop:</string>
|
||||
<reference key="source" ref="511492310"/>
|
||||
<reference key="destination" ref="430240209"/>
|
||||
</object>
|
||||
<int key="connectionID">1975</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">fInactiveStopField</string>
|
||||
<reference key="source" ref="511492310"/>
|
||||
<reference key="destination" ref="430240209"/>
|
||||
</object>
|
||||
<int key="connectionID">1976</int>
|
||||
<int key="connectionID">1983</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
|
@ -12255,7 +12259,7 @@ AAABAAAAAQ</bytes>
|
|||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">1976</int>
|
||||
<int key="maxID">1983</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
@ -12403,7 +12407,7 @@ AAABAAAAAQ</bytes>
|
|||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>addRemoveRPCIP:</string>
|
||||
<string>applyInactiveStopSetting:</string>
|
||||
<string>applyIdleStopSetting:</string>
|
||||
<string>applyRatioSetting:</string>
|
||||
<string>applySpeedSettings:</string>
|
||||
<string>folderSheetShow:</string>
|
||||
|
@ -12430,7 +12434,7 @@ AAABAAAAAQ</bytes>
|
|||
<string>setDownloadLocation:</string>
|
||||
<string>setEncryptionMode:</string>
|
||||
<string>setGlobalLimit:</string>
|
||||
<string>setInactiveStop:</string>
|
||||
<string>setIdleStop:</string>
|
||||
<string>setLPD:</string>
|
||||
<string>setNat:</string>
|
||||
<string>setPEX:</string>
|
||||
|
@ -12540,8 +12544,8 @@ AAABAAAAAQ</bytes>
|
|||
<string>fFolderPopUp</string>
|
||||
<string>fGeneralView</string>
|
||||
<string>fGroupsView</string>
|
||||
<string>fIdleStopField</string>
|
||||
<string>fImportFolderPopUp</string>
|
||||
<string>fInactiveStopField</string>
|
||||
<string>fIncompleteFolderPopUp</string>
|
||||
<string>fNatCheck</string>
|
||||
<string>fNetworkView</string>
|
||||
|
@ -12581,9 +12585,9 @@ AAABAAAAAQ</bytes>
|
|||
<string>NSPopUpButton</string>
|
||||
<string>NSView</string>
|
||||
<string>NSView</string>
|
||||
<string>NSPopUpButton</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSPopUpButton</string>
|
||||
<string>NSPopUpButton</string>
|
||||
<string>NSButton</string>
|
||||
<string>NSView</string>
|
||||
<string>NSTextField</string>
|
||||
|
|
Loading…
Reference in New Issue