Changeset 1078 for trunk/macosx/ExpandedPathToIconTransformer.m
- Timestamp:
- Nov 11, 2006, 8:00:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/ExpandedPathToIconTransformer.m
r1037 r1078 19 19 return nil; 20 20 21 NSImage * icon = [[NSWorkspace sharedWorkspace] iconForFile: [value stringByExpandingTildeInPath]]; 21 NSString * path = [value stringByExpandingTildeInPath]; 22 NSImage * icon; 23 //show a folder icon if the folder doesn't exist 24 if (![[NSFileManager defaultManager] fileExistsAtPath: path] && [[path pathExtension] isEqualToString: @""]) 25 icon = [[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')]; 26 else 27 icon = [[NSWorkspace sharedWorkspace] iconForFile: [value stringByExpandingTildeInPath]]; 28 22 29 [icon setScalesWhenResized: YES]; 23 30 [icon setSize: NSMakeSize(16.0, 16.0)];
Note: See TracChangeset
for help on using the changeset viewer.