Peers progress bar in inspector window. Bar should be red when progress is < .33, yellow when < .66, and green when greater.

This commit is contained in:
Mitchell Livingston 2006-11-10 04:55:52 +00:00
parent 3f129d8829
commit 5f3434788a
5 changed files with 11 additions and 8 deletions

View File

@ -1583,9 +1583,10 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
if (![[fDefaults stringForKey: @"DownloadChoice"] isEqualToString: @"Ask"])
{
enumerator = [newNames objectEnumerator];
int count;
while ((file = [enumerator nextObject]))
{
int count = [fTorrents count];
count = [fTorrents count];
[self openFiles: [NSArray arrayWithObject: file]];
//check if torrent was opened
@ -1600,9 +1601,9 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
//create temporary torrents to check if an import fails because of an error
enumerator = [newNames objectEnumerator];
int error;
while ((file = [enumerator nextObject]))
{
int error;
tr_torrent_t * tempTor = tr_torrentInit(fLib, [file UTF8String], 0, & error);
if (tempTor)

View File

@ -505,12 +505,14 @@
if ([ident isEqualToString: @"Connected"])
return [[peer objectForKey: @"Connected"] boolValue] ? fDotGreen : fDotRed;
else if ([ident isEqualToString: @"Client"])
return [peer objectForKey: @"Client"];
else if ([ident isEqualToString: @"Progress"])
return [peer objectForKey: @"Progress"];
else if ([ident isEqualToString: @"UL To"])
return [[peer objectForKey: @"UL To"] boolValue] ? fCheckImage : nil;
else if ([ident isEqualToString: @"DL From"])
return [[peer objectForKey: @"DL From"] boolValue] ? fCheckImage : nil;
else if ([ident isEqualToString: @"Client"])
return [peer objectForKey: @"Client"];
else
return [peer objectForKey: @"IP"];
}

View File

@ -412,12 +412,11 @@
- (void) setAutoImport: (id) sender
{
NSString * path = [[fDefaults stringForKey: @"AutoImportDirectory"] stringByExpandingTildeInPath];
if ([fDefaults boolForKey: @"AutoImport"])
[[UKKQueue sharedFileWatcher] addPath:
[[fDefaults stringForKey: @"AutoImportDirectory"] stringByExpandingTildeInPath]];
[[UKKQueue sharedFileWatcher] addPath: path];
else
[[UKKQueue sharedFileWatcher] removePathFromQueue:
[[fDefaults stringForKey: @"AutoImportDirectory"] stringByExpandingTildeInPath]];
[[UKKQueue sharedFileWatcher] removePathFromQueue: path];
[[NSNotificationCenter defaultCenter] postNotificationName: @"AutoImportSettingChange" object: self];
}

View File

@ -700,6 +700,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[NSNumber numberWithBool: peer.isIncoming], @"Incoming",
[NSString stringWithCString: (char *) peer.addr encoding: NSUTF8StringEncoding], @"IP",
[NSString stringWithCString: (char *) peer.client encoding: NSUTF8StringEncoding], @"Client",
[NSNumber numberWithFloat: peer.progress], @"Progress",
[NSNumber numberWithBool: peer.isDownloading], @"UL To",
[NSNumber numberWithBool: peer.isUploading], @"DL From", nil]];
}