1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

patch from BiHi to always display the second value of remaining times with double digits; rephrase "Resume Selected Without Wait" to "Resume Selected Right Away"

This commit is contained in:
Mitchell Livingston 2007-12-03 19:59:11 +00:00
parent 39d8c74fcd
commit c381a9cf0f
3 changed files with 5 additions and 6 deletions

View file

@ -10,8 +10,7 @@
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>1480</integer>
<integer>21</integer>
<integer>1808</integer>
</array>
<key>IBSystem Version</key>
<string>9B18</string>

Binary file not shown.

View file

@ -749,18 +749,18 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
if (eta < 60)
return [NSString stringWithFormat: NSLocalizedString(@"%d sec", "Torrent -> remaining time"), eta];
else if (eta < 3600) //60 * 60
return [NSString stringWithFormat: NSLocalizedString(@"%d min %d sec", "Torrent -> remaining time"),
return [NSString stringWithFormat: NSLocalizedString(@"%d min %02d sec", "Torrent -> remaining time"),
eta / 60, eta % 60];
else if (eta < 86400) //24 * 60 * 60
return [NSString stringWithFormat: NSLocalizedString(@"%d hr %d min", "Torrent -> remaining time"),
return [NSString stringWithFormat: NSLocalizedString(@"%d hr %02d min", "Torrent -> remaining time"),
eta / 3600, (eta / 60) % 60];
else
{
int days = eta / 86400, hours = (eta / 3600) % 24;
if (days > 1)
return [NSString stringWithFormat: NSLocalizedString(@"%d days %d hr", "Torrent -> remaining time"), days, hours];
return [NSString stringWithFormat: NSLocalizedString(@"%d days %02d hr", "Torrent -> remaining time"), days, hours];
else
return [NSString stringWithFormat: NSLocalizedString(@"1 day %d hr", "Torrent -> remaining time"), hours];
return [NSString stringWithFormat: NSLocalizedString(@"1 day %02d hr", "Torrent -> remaining time"), hours];
}
}