From 8eb2ec59c20a01ead435919e29a73b122a0b8ffe Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 18 Dec 2006 04:12:01 +0000 Subject: [PATCH] expanded tooltips in peer inspector window --- macosx/InfoWindowController.m | 19 +++++++++---------- macosx/Torrent.m | 3 ++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 8f83c6afb..a7c41c3da 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -587,16 +587,15 @@ } 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]) - return NSLocalizedString(@"From incoming connection", "Inspector -> Peers tab -> table row tooltip"); - else - return NSLocalizedString(@"From outgoing connection", "Inspector -> Peers tab -> table row tooltip"); - } + NSDictionary * peerDic = [fPeers objectAtIndex: row]; + return [NSString stringWithFormat: NSLocalizedString(@"Progress: %.1f%%" + "\nPort: %@" + "\nFrom %@ connection", "Inspector -> Peers tab -> table row tooltip"), + [[peerDic objectForKey: @"Progress"] floatValue] * 100.0, + [peerDic objectForKey: @"Port"], + [[peerDic objectForKey: @"Incoming"] boolValue] + ? NSLocalizedString(@"incoming", "Inspector -> Peers tab -> table row tooltip") + : NSLocalizedString(@"outgoing", "Inspector -> Peers tab -> table row tooltip")]; } else return nil; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 00d0ca44c..68f00c2f2 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -851,7 +851,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 [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]]; + [NSNumber numberWithBool: peer.isUploading], @"DL From", + [NSNumber numberWithInt: peer.port], @"Port", nil]]; } tr_torrentPeersFree(peers, totalPeers);