store file list icons to increase speed under the file tab

This commit is contained in:
Mitchell Livingston 2007-03-05 02:31:20 +00:00
parent 2e65e41d75
commit 5b0332ea4b
2 changed files with 3 additions and 2 deletions

View File

@ -715,8 +715,8 @@
if (!item)
return;
NSImage * icon = [[NSWorkspace sharedWorkspace] iconForFileType: ![[item objectForKey: @"IsFolder"] boolValue]
? [[item objectForKey: @"Name"] pathExtension] : NSFileTypeForHFSTypeCode('fldr')];
NSImage * icon = [[item objectForKey: @"IsFolder"] boolValue] ? [[fTorrents objectAtIndex: 0] icon]
: [item objectForKey: @"Icon"];
[cell setImage: icon];
}
else if ([[tableColumn identifier] isEqualToString: @"Check"])

View File

@ -1339,6 +1339,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
{
[flatList addObject: dict];
[dict setObject: [NSNumber numberWithUnsignedLongLong: size] forKey: @"Size"];
[dict setObject: [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]] forKey: @"Icon"];
}
if (parent)