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)
|
else if (tableView == fPeerTable)
|
||||||
{
|
{
|
||||||
if ([[column identifier] isEqualToString: @"Progress"])
|
NSDictionary * peerDic = [fPeers objectAtIndex: row];
|
||||||
return [NSString stringWithFormat: @"%.1f%%", [[[fPeers objectAtIndex: row]
|
return [NSString stringWithFormat: NSLocalizedString(@"Progress: %.1f%%"
|
||||||
objectForKey: @"Progress"] floatValue] * 100.0];
|
"\nPort: %@"
|
||||||
else
|
"\nFrom %@ connection", "Inspector -> Peers tab -> table row tooltip"),
|
||||||
{
|
[[peerDic objectForKey: @"Progress"] floatValue] * 100.0,
|
||||||
if ([[[fPeers objectAtIndex: row] objectForKey: @"Incoming"] boolValue])
|
[peerDic objectForKey: @"Port"],
|
||||||
return NSLocalizedString(@"From incoming connection", "Inspector -> Peers tab -> table row tooltip");
|
[[peerDic objectForKey: @"Incoming"] boolValue]
|
||||||
else
|
? NSLocalizedString(@"incoming", "Inspector -> Peers tab -> table row tooltip")
|
||||||
return NSLocalizedString(@"From outgoing connection", "Inspector -> Peers tab -> table row tooltip");
|
: NSLocalizedString(@"outgoing", "Inspector -> Peers tab -> table row tooltip")];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return nil;
|
return nil;
|
||||||
|
|||||||
@@ -851,7 +851,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||||||
[NSString stringWithCString: (char *) peer.client encoding: NSUTF8StringEncoding], @"Client",
|
[NSString stringWithCString: (char *) peer.client encoding: NSUTF8StringEncoding], @"Client",
|
||||||
[NSNumber numberWithFloat: peer.progress], @"Progress",
|
[NSNumber numberWithFloat: peer.progress], @"Progress",
|
||||||
[NSNumber numberWithBool: peer.isDownloading], @"UL To",
|
[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);
|
tr_torrentPeersFree(peers, totalPeers);
|
||||||
|
|||||||
Reference in New Issue
Block a user