Changeset 9186


Ignore:
Timestamp:
09/26/09 17:04:27 (7 years ago)
Author:
livings124
Message:

show tracker icons on 10.5

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.h

    r9183 r9186  
    7777    NSArray * fTrackers;
    7878    NSCache * fTrackerIconCache;
     79    NSMutableDictionary * fTrackerIconCacheLeopard;
    7980    NSMutableSet * fTrackerIconLoading;
    8081   
  • trunk/macosx/InfoWindowController.m

    r9184 r9186  
    195195   
    196196    if ([NSApp isOnSnowLeopardOrBetter])
    197     {
    198197        fTrackerIconCache = [[NSCache alloc] init];
    199         fTrackerIconLoading = [[NSMutableSet alloc] init];
    200     }
    201198    else
    202         [fTrackerTable removeTableColumn: [fTrackerTable tableColumnWithIdentifier: @"Icon"]];
     199        fTrackerIconCacheLeopard = [[NSMutableDictionary alloc] init];
     200    fTrackerIconLoading = [[NSMutableSet alloc] init];
    203201   
    204202    //set blank inspector
     
    240238   
    241239    [fTrackerIconCache release];
     240    [fTrackerIconCacheLeopard release];
    242241    [fTrackerIconLoading release];
    243242   
     
    910909                baseAddress = [NSString stringWithFormat: @"http://%@", [hostComponents lastObject]];
    911910           
    912             id icon = [fTrackerIconCache objectForKey: baseAddress];
     911            id icon = [NSApp isOnSnowLeopardOrBetter] ? [fTrackerIconCache objectForKey: baseAddress]
     912                                                    : [fTrackerIconCacheLeopard objectForKey: baseAddress];
    913913            if (!icon && ![fTrackerIconLoading containsObject: baseAddress])
    914914            {
     
    941941    {
    942942        [fTrackerIconCache setObject: icon forKey: baseAddress];
     943        [fTrackerIconCacheLeopard setObject: icon forKey: baseAddress];
    943944        [icon release];
    944945    }
    945946    else
     947    {
    946948        [fTrackerIconCache setObject: [NSNull null] forKey: baseAddress];
     949        [fTrackerIconCacheLeopard setObject: [NSNull null] forKey: baseAddress];
     950    }
    947951   
    948952    [fTrackerIconLoading removeObject: baseAddress];
Note: See TracChangeset for help on using the changeset viewer.