Changeset 3037
- Timestamp:
- 07/05/05 17:21:29 (4 years ago)
- Files:
-
- Footagehead/trunk/FHCache.h (modified) (1 diff)
- Footagehead/trunk/FHCache.m (modified) (2 diffs)
- Footagehead/trunk/FHController.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Footagehead/trunk/FHCache.h
r2970 r3037 52 52 - (void)setThumbnail:(FHImage *)image forURL:(ZAURL *)url; 53 53 - (FHImage *)thumbnailForURL:(ZAURL *)url; 54 - (void)dropThumbnailsForURL:(ZAURL *)url; 54 55 55 56 @end Footagehead/trunk/FHCache.m
r2970 r3037 131 131 - (void)setThumbnail:(FHImage *)image forURL:(ZAURL *)url { 132 132 if([_thumbnails count] > 500) 133 [_ largeFileIcons removeObjectForKey:[[_thumbnails allKeys] objectAtIndex:0]];133 [_thumbnails removeObjectForKey:[[_thumbnails allKeys] objectAtIndex:0]]; 134 134 135 135 [_thumbnails setObject:image forKey:[url string]]; … … 142 142 } 143 143 144 145 146 - (void)dropThumbnailsForURL:(ZAURL *)url { 147 NSArray *keys; 148 NSString *key, *string; 149 unsigned int i, count; 150 151 keys = [_thumbnails allKeys]; 152 string = [url string]; 153 154 for(i = 0, count = [keys count]; i < count; i++) { 155 key = [keys objectAtIndex:i]; 156 157 if([key hasPrefix:string]) 158 [_thumbnails removeObjectForKey:key]; 159 } 160 } 161 144 162 @end Footagehead/trunk/FHController.m
r3033 r3037 645 645 646 646 - (IBAction)reload:(id)sender { 647 [self loadURL:[_handler URL] selectRow:[_tableView selectedRow]]; 647 ZAURL *url; 648 649 url = [_handler URL]; 650 [[FHCache cache] dropThumbnailsForURL:url]; 651 [self loadURL:url selectRow:[_tableView selectedRow]]; 648 652 } 649 653
