mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
expanded tooltips in peer inspector window
This commit is contained in:
parent
058b31aaf7
commit
8eb2ec59c2
2 changed files with 11 additions and 11 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue