Corrected keys for rate limits

Always set limit, even if value entered is wrong
This commit is contained in:
Eric Petit 2006-04-07 17:10:27 +00:00
parent 6e9f6ec11e
commit b8fc3f76c9
1 changed files with 8 additions and 7 deletions

View File

@ -256,7 +256,7 @@
{
int limit = [sender intValue];
NSString * key = ( sender == fUploadField ) ?
@"CheckUpload" : @"CheckDownload";
@"UploadLimit" : @"DownloadLimit";
//if value entered is not an int or is less than 0 do not change
if (![[sender stringValue] isEqualToString:
@ -269,13 +269,14 @@
else
{
[fDefaults setInteger: limit forKey: key];
if( sender == fUploadField )
tr_setUploadLimit( fHandle,
( [fUploadCheck state] == NSOffState ) ? -1 : limit );
else
tr_setDownloadLimit( fHandle,
( [fDownloadCheck state] == NSOffState ) ? -1 : limit );
}
if( sender == fUploadField )
tr_setUploadLimit( fHandle,
( [fUploadCheck state] == NSOffState ) ? -1 : limit );
else
tr_setDownloadLimit( fHandle,
( [fDownloadCheck state] == NSOffState ) ? -1 : limit );
}
- (void) setQuitMessage: (id) sender