如何在图标视图中找到finder overlay图标的完整路径?

时间:2012-11-07 09:26:08

标签: icons overlay finder simbl

我正在使用simbl插件在finder中添加叠加图标,如下所示:finder overlay icon

问题是:我找不到在覆盖函数中获取文件完整路径的正确方法:IKImageBrowserCell中的FO_drawImage,我只得到一个标题。

   - (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];
    }
}

1 个答案:

答案 0 :(得分:0)

NSURL *item_url = [self previewItemURL];

应该在MacOSX 10.7上覆盖它