mirror of
https://github.com/transmission/transmission
synced 2025-02-22 06:00:41 +00:00
some tidying up
This commit is contained in:
parent
d6b8106097
commit
d7007dd1f2
3 changed files with 2 additions and 4 deletions
|
@ -1871,8 +1871,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||||
if (!(importedNames = [[NSFileManager defaultManager] directoryContentsAtPath: path]))
|
if (!(importedNames = [[NSFileManager defaultManager] directoryContentsAtPath: path]))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//only import those that have not been imported yet
|
//only check files that have not been checked yet
|
||||||
#warning no mutable array
|
|
||||||
NSMutableArray * newNames = [importedNames mutableCopy];
|
NSMutableArray * newNames = [importedNames mutableCopy];
|
||||||
[newNames removeObjectsInArray: fAutoImportedNames];
|
[newNames removeObjectsInArray: fAutoImportedNames];
|
||||||
[fAutoImportedNames setArray: importedNames];
|
[fAutoImportedNames setArray: importedNames];
|
||||||
|
|
|
@ -682,7 +682,7 @@
|
||||||
else if ([ident isEqualToString: @"Client"])
|
else if ([ident isEqualToString: @"Client"])
|
||||||
return [peer objectForKey: @"Client"];
|
return [peer objectForKey: @"Client"];
|
||||||
else if ([ident isEqualToString: @"Progress"])
|
else if ([ident isEqualToString: @"Progress"])
|
||||||
return [[peer objectForKey: @"Connected"] boolValue] ? [peer objectForKey: @"Progress"] : 0;
|
return [[peer objectForKey: @"Connected"] boolValue] ? [peer objectForKey: @"Progress"] : -1;
|
||||||
else if ([ident isEqualToString: @"UL To"])
|
else if ([ident isEqualToString: @"UL To"])
|
||||||
return [[peer objectForKey: @"Connected"] boolValue] && [[peer objectForKey: @"UL To"] boolValue]
|
return [[peer objectForKey: @"Connected"] boolValue] && [[peer objectForKey: @"UL To"] boolValue]
|
||||||
? [NSString stringForSpeedAbbrev: [[peer objectForKey: @"UL To Rate"] floatValue]] : @"";
|
? [NSString stringForSpeedAbbrev: [[peer objectForKey: @"UL To Rate"] floatValue]] : @"";
|
||||||
|
|
|
@ -994,7 +994,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
[NSNumber numberWithBool: peer->isConnected], @"Connected",
|
[NSNumber numberWithBool: peer->isConnected], @"Connected",
|
||||||
[NSNumber numberWithInt: peer->from], @"From",
|
[NSNumber numberWithInt: peer->from], @"From",
|
||||||
[NSString stringWithCString: (char *) peer->addr encoding: NSUTF8StringEncoding], @"IP",
|
[NSString stringWithCString: (char *) peer->addr encoding: NSUTF8StringEncoding], @"IP",
|
||||||
[NSString stringWithCString: (char *) peer->client encoding: NSUTF8StringEncoding], @"Client",
|
|
||||||
[NSNumber numberWithInt: peer->port], @"Port", nil];
|
[NSNumber numberWithInt: peer->port], @"Port", nil];
|
||||||
|
|
||||||
if (peer->isConnected)
|
if (peer->isConnected)
|
||||||
|
|
Loading…
Reference in a new issue