1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 14:13:23 +00:00

for users that have "times open" displayed as 0, display "n/a" instead

This commit is contained in:
Mitchell Livingston 2008-05-23 16:54:01 +00:00
parent d18fb68fbc
commit ecb0dfc0f3

View file

@ -193,11 +193,18 @@ tr_handle * fLib;
[fTimeAllField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%@ total", "stats total"),
[NSString timeString: statsAll.secondsActive showSeconds: NO]]];
if (statsAll.sessionCount == 1)
switch (statsAll.sessionCount)
{
case 1:
[fNumOpenedField setStringValue: NSLocalizedString(@"1 time", "stats window -> times opened")];
else
break;
case 0: //for users that have this problem
[fNumOpenedField setStringValue: NSLocalizedString(@"n/a", "stats window -> times opened")];
break;
default:
[fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d times", "stats window -> times opened"),
statsAll.sessionCount]];
}
}
- (void) performResetStats