tooltip shows peer's percent when over progress bar

This commit is contained in:
Mitchell Livingston 2006-11-10 05:04:44 +00:00
parent 5f3434788a
commit b076a34ab8
1 changed files with 9 additions and 3 deletions

View File

@ -557,10 +557,16 @@
}
else if (tableView == fPeerTable)
{
if ([[[fPeers objectAtIndex: row] objectForKey: @"Incoming"] boolValue])
return NSLocalizedString(@"From incoming connection", "Inspector -> Peers tab -> table row tooltip");
if ([[column identifier] isEqualToString: @"Progress"])
return [NSString stringWithFormat: @"%.1f%%", [[[fPeers objectAtIndex: row]
objectForKey: @"Progress"] floatValue] * 100.0];
else
return NSLocalizedString(@"From outgoing connection", "Inspector -> Peers tab -> table row tooltip");
{
if ([[[fPeers objectAtIndex: row] objectForKey: @"Incoming"] boolValue])
return NSLocalizedString(@"From incoming connection", "Inspector -> Peers tab -> table row tooltip");
else
return NSLocalizedString(@"From outgoing connection", "Inspector -> Peers tab -> table row tooltip");
}
}
else
return nil;