Changeset 9209
- Timestamp:
- Sep 28, 2009, 2:13:20 PM (13 years ago)
- Location:
- trunk/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/TrackerCell.m
r9208 r9209 52 52 53 53 //make the favicons accessible to all tracker cells 54 NSCache * fTrackerIconCache; 55 NSMutableDictionary * fTrackerIconCache Leopard;54 #warning make NSCache when 10.6-only 55 NSMutableDictionary * fTrackerIconCache; 56 56 NSMutableSet * fTrackerIconLoading; 57 57 58 58 + (void) initialize 59 59 { 60 if ([NSApp isOnSnowLeopardOrBetter]) 61 fTrackerIconCache = [[NSCache alloc] init]; 62 else 63 fTrackerIconCacheLeopard = [[NSMutableDictionary alloc] init]; 60 fTrackerIconCache = [[NSMutableDictionary alloc] init]; 64 61 fTrackerIconLoading = [[NSMutableSet alloc] init]; 65 62 } … … 165 162 baseAddress = [NSString stringWithFormat: @"http://%@", [hostComponents lastObject]]; 166 163 167 id icon = [NSApp isOnSnowLeopardOrBetter] ? [fTrackerIconCache objectForKey: baseAddress] 168 : [fTrackerIconCacheLeopard objectForKey: baseAddress]; 164 id icon = [fTrackerIconCache objectForKey: baseAddress]; 169 165 if (!icon && ![fTrackerIconLoading containsObject: baseAddress]) 170 166 { … … 189 185 if (icon) 190 186 { 191 [NSApp isOnSnowLeopardOrBetter] ? [fTrackerIconCache setObject: icon forKey: baseAddress] 192 : [fTrackerIconCacheLeopard setObject: icon forKey: baseAddress]; 187 [fTrackerIconCache setObject: icon forKey: baseAddress]; 193 188 [icon release]; 194 189 } 195 190 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]; 200 192 201 193 [fTrackerIconLoading removeObject: baseAddress]; -
trunk/macosx/TrackerNode.h
r9203 r9209 36 36 - (NSString *) fullAnnounceAddress; 37 37 38 - (NSInteger) totalSeeders; 39 - (NSInteger) totalLeechers; 40 - (NSInteger) totalDownloaded; 41 38 42 - (NSString *) lastAnnounceStatusString; 39 43 - (NSString *) nextAnnounceStatusString; -
trunk/macosx/TrackerNode.m
r9203 r9209 53 53 { 54 54 return [NSString stringWithUTF8String: fStat.announce]; 55 } 56 57 - (NSInteger) totalSeeders 58 { 59 return fStat.seederCount; 60 } 61 62 - (NSInteger) totalLeechers 63 { 64 return fStat.leecherCount; 65 } 66 67 - (NSInteger) totalDownloaded 68 { 69 return fStat.downloadCount; 55 70 } 56 71
Note: See TracChangeset
for help on using the changeset viewer.