1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

expanded tooltips in peer inspector window

This commit is contained in:
Mitchell Livingston 2006-12-18 04:12:01 +00:00
parent 058b31aaf7
commit 8eb2ec59c2
2 changed files with 11 additions and 11 deletions

View file

@ -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;

View file

@ -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);