Changeset 5914


Ignore:
Timestamp:
May 23, 2008, 4:54:01 PM (14 years ago)
Author:
livings124
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/StatsWindowController.m

    r5908 r5914  
    194194                                        [NSString timeString: statsAll.secondsActive showSeconds: NO]]];
    195195   
    196     if (statsAll.sessionCount == 1)
    197         [fNumOpenedField setStringValue: NSLocalizedString(@"1 time", "stats window -> times opened")];
    198     else
    199         [fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d times", "stats window -> times opened"),
    200                                         statsAll.sessionCount]];
     196    switch (statsAll.sessionCount)
     197    {
     198        case 1:
     199            [fNumOpenedField setStringValue: NSLocalizedString(@"1 time", "stats window -> times opened")];
     200            break;
     201        case 0: //for users that have this problem
     202            [fNumOpenedField setStringValue: NSLocalizedString(@"n/a", "stats window -> times opened")];
     203            break;
     204        default:
     205            [fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d times", "stats window -> times opened"),
     206                                                statsAll.sessionCount]];
     207    }
    201208}
    202209
Note: See TracChangeset for help on using the changeset viewer.