Changeset 1533


Ignore:
Timestamp:
Mar 5, 2007, 4:51:32 PM (15 years ago)
Author:
livings124
Message:

avoid retaining tons of copies of the folder icon

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.h

    r1471 r1533  
    3030@interface InfoWindowController : NSWindowController
    3131{
    32     NSArray * fTorrents;
    33     NSArray * fPeers, * fFiles;
    34     NSImage * fAppIcon, * fDotGreen, * fDotRed;
     32    NSArray * fTorrents, * fPeers, * fFiles;
     33    NSImage * fAppIcon, * fDotGreen, * fDotRed, * fFolderIcon;
    3534   
    3635    IBOutlet NSTabView * fTabView;
  • trunk/macosx/InfoWindowController.m

    r1527 r1533  
    7575        fDotGreen = [NSImage imageNamed: @"GreenDot.tiff"];
    7676        fDotRed = [NSImage imageNamed: @"RedDot.tiff"];
     77       
     78        fFolderIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
    7779    }
    7880    return self;
     
    119121
    120122    [fAppIcon release];
     123    [fFolderIcon release];
    121124    [super dealloc];
    122125}
     
    716719            return;
    717720       
    718         [cell setImage: [item objectForKey: @"Icon"]];
     721        [cell setImage: [[item objectForKey: @"IsFolder"] boolValue] ? fFolderIcon : [item objectForKey: @"Icon"]];
    719722    }
    720723    else if ([[tableColumn identifier] isEqualToString: @"Check"])
  • trunk/macosx/Torrent.m

    r1527 r1533  
    13351335            [dict setObject: [NSMutableArray array] forKey: @"Children"];
    13361336            [dict setObject: [NSNumber numberWithInt: 1] forKey: @"Remaining"];
    1337             [dict setObject: [[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] forKey: @"Icon"];
    13381337        }
    13391338        else
Note: See TracChangeset for help on using the changeset viewer.