mirror of
https://github.com/transmission/transmission.git
synced 2025-12-23 20:08:43 +00:00
expanded tooltips in peer inspector window
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user