From 5b0332ea4b9b7e1619fa079f4d7334b356703259 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 5 Mar 2007 02:31:20 +0000 Subject: [PATCH] store file list icons to increase speed under the file tab --- macosx/InfoWindowController.m | 4 ++-- macosx/Torrent.m | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 39cc8c375..bc0cdc1f4 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -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"]) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 5625e7697..ee9a7189f 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -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)