Ignore:
Timestamp:
Sep 28, 2009, 2:13:20 PM (13 years ago)
Author:
livings124
Message:

don't use a NSCache until we go 10.6-only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TrackerCell.m

    r9208 r9209  
    5252
    5353//make the favicons accessible to all tracker cells
    54 NSCache * fTrackerIconCache;
    55 NSMutableDictionary * fTrackerIconCacheLeopard;
     54#warning make NSCache when 10.6-only
     55NSMutableDictionary * fTrackerIconCache;
    5656NSMutableSet * fTrackerIconLoading;
    5757
    5858+ (void) initialize
    5959{
    60     if ([NSApp isOnSnowLeopardOrBetter])
    61         fTrackerIconCache = [[NSCache alloc] init];
    62     else
    63         fTrackerIconCacheLeopard = [[NSMutableDictionary alloc] init];
     60    fTrackerIconCache = [[NSMutableDictionary alloc] init];
    6461    fTrackerIconLoading = [[NSMutableSet alloc] init];
    6562}
     
    165162        baseAddress = [NSString stringWithFormat: @"http://%@", [hostComponents lastObject]];
    166163   
    167     id icon = [NSApp isOnSnowLeopardOrBetter] ? [fTrackerIconCache objectForKey: baseAddress]
    168                                             : [fTrackerIconCacheLeopard objectForKey: baseAddress];
     164    id icon = [fTrackerIconCache objectForKey: baseAddress];
    169165    if (!icon && ![fTrackerIconLoading containsObject: baseAddress])
    170166    {
     
    189185    if (icon)
    190186    {
    191         [NSApp isOnSnowLeopardOrBetter] ? [fTrackerIconCache setObject: icon forKey: baseAddress]
    192                                         : [fTrackerIconCacheLeopard setObject: icon forKey: baseAddress];
     187        [fTrackerIconCache setObject: icon forKey: baseAddress];
    193188        [icon release];
    194189    }
    195190    else
    196     {
    197         [NSApp isOnSnowLeopardOrBetter] ? [fTrackerIconCache setObject: [NSNull null] forKey: baseAddress]
    198                                         : [fTrackerIconCacheLeopard setObject: [NSNull null] forKey: baseAddress];
    199     }
     191        [fTrackerIconCache setObject: [NSNull null] forKey: baseAddress];
    200192   
    201193    [fTrackerIconLoading removeObject: baseAddress];
Note: See TracChangeset for help on using the changeset viewer.