1

I'm using simbl plugins to add overlay icon in finder like this: finder overlay icon

The problem is: I can not find the right way to get the file's full path in override function: FO_drawImage in IKImageBrowserCell, I only get a title.

   - (void)FO_drawImage:(id)fp8
    {
        NSString *title = [self previewItemTitle];
        if ([[title lowercaseString] hasPrefix:@"a"])

    {
        NSImage *icon = [fp8 _nsImage];

        NSRect frame = [self imageFrame];
        NSLog(@"drawing width %.0f for name '%@' icon %@",frame.size.width,title,icon);
        [icon lockFocus];
        CGContextRef myContext = [[NSGraphicsContext currentContext] graphicsPort];
        CGContextSetRGBFillColor (myContext, 1, 0, 0, 1);
        CGContextFillEllipseInRect(myContext, CGRectMake (0, 0, 10, 10 ));
        [icon unlockFocus];
        [self FO_drawImage:[[[IKImageWrapper alloc] initWithNSImage:icon] autorelease]];

    } else {
        [self FO_drawImage:fp8];
    }
}
user
  • 86,916
  • 18
  • 197
  • 190
twotrees
  • 11
  • 1
  • when I use IKImageWrapper my xcode give me the info "(null): "_OBJC_CLASS_$_IKImageWrapper", referenced from:" I want to know why? – 6 1 Apr 11 '13 at 09:37

1 Answers1

0
NSURL *item_url = [self previewItemURL];

that should cover it on MacOSX 10.7

Orbitus007
  • 685
  • 6
  • 12