1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

store the folder image in browser cell

This commit is contained in:
Mitchell Livingston 2007-08-10 18:00:44 +00:00
parent 00586a513b
commit 49bffb64f4
2 changed files with 16 additions and 3 deletions

View file

@ -26,6 +26,8 @@
@interface FileBrowserCell : NSBrowserCell
{
NSImage * fFolderImage;
float fPercent;
NSMutableDictionary * fTitleAttributes, * fStatusAttributes;

View file

@ -49,10 +49,21 @@
- (void) setImage: (NSImage *) image
{
if (!image)
image = [[[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy] autorelease];
{
if (!fFolderImage)
{
fFolderImage = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
[fFolderImage setFlipped: YES];
[fFolderImage setScalesWhenResized: YES];
}
image = fFolderImage;
}
else
{
[image setFlipped: YES];
[image setScalesWhenResized: YES];
}
[image setFlipped: YES];
[image setScalesWhenResized: YES];
[super setImage: image];
}