From b076a34ab85a78e3bb6afad049d70b90ea4c07a3 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Fri, 10 Nov 2006 05:04:44 +0000 Subject: [PATCH] tooltip shows peer's percent when over progress bar --- macosx/InfoWindowController.m | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 9ff9b88bd..3c092a91a 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -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;