Changeset 5926


Ignore:
Timestamp:
May 23, 2008, 10:58:17 PM (14 years ago)
Author:
livings124
Message:

potential fix for users that have "0 times" opened in stats window

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileListNode.m

    r5910 r5926  
    5757- (void) insertChild: (FileListNode *) child
    5858{
    59     NSAssert(fIsFolder, @"method can only be invoked on files");
     59    NSAssert(fIsFolder, @"method can only be invoked on folders");
    6060   
    6161    [fChildren addObject: child];
     
    6464- (void) insertIndex: (NSUInteger) index withSize: (uint64_t) size
    6565{
    66     NSAssert(fIsFolder, @"method can only be invoked on files");
     66    NSAssert(fIsFolder, @"method can only be invoked on folders");
    6767   
    6868    [fIndexes addIndex: index];
  • trunk/macosx/StatsWindowController.m

    r5915 r5926  
    194194                                        [NSString timeString: statsAll.secondsActive showSeconds: NO]]];
    195195   
    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     }
     196    if (statsAll.sessionCount == 1)
     197        [fNumOpenedField setStringValue: NSLocalizedString(@"1 time", "stats window -> times opened")];
     198    else
     199        [fNumOpenedField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%u times", "stats window -> times opened"),
     200                                            statsAll.sessionCount]];
    208201}
    209202
Note: See TracChangeset for help on using the changeset viewer.