Ignore:
Timestamp:
Dec 27, 2009, 7:30:20 PM (12 years ago)
Author:
livings124
Message:

avoid needlessly copying the folder icon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileNameCell.m

    r9723 r9828  
    7575    [fStatusAttributes release];
    7676   
    77     [fFolderImage release];
    78    
    7977    [super dealloc];
    8078}
     
    8785    copy->fStatusAttributes = [fStatusAttributes retain];
    8886   
    89     copy->fFolderImage = [fFolderImage retain];
    90    
    9187    return copy;
    9288}
     
    9591{
    9692    FileListNode * node = (FileListNode *)[self objectValue];
    97     NSImage * image;
    98     if ([node isFolder])
    99     {
    100         if (!fFolderImage)
    101             fFolderImage = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
    102         image = fFolderImage;
    103     }
    104     else
    105         image = [node icon];
    106    
    107     return image;
     93    return [node icon];
    10894}
    10995
Note: See TracChangeset for help on using the changeset viewer.