store file list icons to increase speed under the file tab
This commit is contained in:
parent
2e65e41d75
commit
5b0332ea4b
|
@ -715,8 +715,8 @@
|
||||||
if (!item)
|
if (!item)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NSImage * icon = [[NSWorkspace sharedWorkspace] iconForFileType: ![[item objectForKey: @"IsFolder"] boolValue]
|
NSImage * icon = [[item objectForKey: @"IsFolder"] boolValue] ? [[fTorrents objectAtIndex: 0] icon]
|
||||||
? [[item objectForKey: @"Name"] pathExtension] : NSFileTypeForHFSTypeCode('fldr')];
|
: [item objectForKey: @"Icon"];
|
||||||
[cell setImage: icon];
|
[cell setImage: icon];
|
||||||
}
|
}
|
||||||
else if ([[tableColumn identifier] isEqualToString: @"Check"])
|
else if ([[tableColumn identifier] isEqualToString: @"Check"])
|
||||||
|
|
|
@ -1339,6 +1339,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
{
|
{
|
||||||
[flatList addObject: dict];
|
[flatList addObject: dict];
|
||||||
[dict setObject: [NSNumber numberWithUnsignedLongLong: size] forKey: @"Size"];
|
[dict setObject: [NSNumber numberWithUnsignedLongLong: size] forKey: @"Size"];
|
||||||
|
[dict setObject: [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]] forKey: @"Icon"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent)
|
if (parent)
|
||||||
|
|
Loading…
Reference in New Issue