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

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