Changeset 2712


Ignore:
Timestamp:
Aug 10, 2007, 6:00:44 PM (15 years ago)
Author:
livings124
Message:

store the folder image in browser cell

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileBrowserCell.h

    r2710 r2712  
    2727@interface FileBrowserCell : NSBrowserCell
    2828{
     29    NSImage * fFolderImage;
     30   
    2931    float fPercent;
    3032   
  • trunk/macosx/FileBrowserCell.m

    r2711 r2712  
    5050{
    5151    if (!image)
    52         image = [[[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy] autorelease];
     52    {
     53        if (!fFolderImage)
     54        {
     55            fFolderImage = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
     56            [fFolderImage setFlipped: YES];
     57            [fFolderImage setScalesWhenResized: YES];
     58        }
     59        image = fFolderImage;
     60    }
     61    else
     62    {
     63        [image setFlipped: YES];
     64        [image setScalesWhenResized: YES];
     65    }
    5366   
    54     [image setFlipped: YES];
    55     [image setScalesWhenResized: YES];
    5667    [super setImage: image];
    5768}
Note: See TracChangeset for help on using the changeset viewer.