1

我正在使用 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];
    }
}
4

1 回答 1

0
NSURL *item_url = [self previewItemURL];

应该在 MacOSX 10.7 上覆盖它

于 2013-03-05T22:23:15.233 回答