Created
February 7, 2010 18:09
-
-
Save jxpx777/297567 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSMetadataItem+JPQLPreviewItem.m | |
// Created by Jamie Phelps on 2/6/10. | |
// | |
// Licensed under the Don't Be A Dick License | |
// | |
@interface NSMetadataItem (JPQLPreviewItem) | |
-(NSString *)previewItemTitle; | |
-(NSURL *)previewItemURL; | |
@end | |
#import "NSMetadataItem+JPQLPreviewItem.m" | |
#import <Cocoa/Cocoa.h> | |
#import <QuickLook/QuickLook.h> | |
@implementation NSMetadataItem (JPQLPreviewItem) | |
-(NSString *)previewItemTitle;{ | |
if([self respondsToSelector:@selector(imageTitle)]) { return [self imageTitle]; } | |
return [self valueForAttribute:@"kMDItemPath"]; | |
} | |
-(NSURL *)previewItemURL;{ | |
return [NSURL fileURLWithPath:[self valueForAttribute:@"kMDItemPath"]]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment