1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 13:16:53 +00:00

some tidying up

This commit is contained in:
Mitchell Livingston 2007-05-06 17:18:11 +00:00
parent d6b8106097
commit d7007dd1f2
3 changed files with 2 additions and 4 deletions

View file

@ -1871,8 +1871,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
if (!(importedNames = [[NSFileManager defaultManager] directoryContentsAtPath: path]))
return;
//only import those that have not been imported yet
#warning no mutable array
//only check files that have not been checked yet
NSMutableArray * newNames = [importedNames mutableCopy];
[newNames removeObjectsInArray: fAutoImportedNames];
[fAutoImportedNames setArray: importedNames];

View file

@ -682,7 +682,7 @@
else if ([ident isEqualToString: @"Client"])
return [peer objectForKey: @"Client"];
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"])
return [[peer objectForKey: @"Connected"] boolValue] && [[peer objectForKey: @"UL To"] boolValue]
? [NSString stringForSpeedAbbrev: [[peer objectForKey: @"UL To Rate"] floatValue]] : @"";

View file

@ -994,7 +994,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[NSNumber numberWithBool: peer->isConnected], @"Connected",
[NSNumber numberWithInt: peer->from], @"From",
[NSString stringWithCString: (char *) peer->addr encoding: NSUTF8StringEncoding], @"IP",
[NSString stringWithCString: (char *) peer->client encoding: NSUTF8StringEncoding], @"Client",
[NSNumber numberWithInt: peer->port], @"Port", nil];
if (peer->isConnected)