diff options
Diffstat (limited to 'QSThingsPlugin/QSThingsPluginSource.m')
| -rw-r--r-- | QSThingsPlugin/QSThingsPluginSource.m | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/QSThingsPlugin/QSThingsPluginSource.m b/QSThingsPlugin/QSThingsPluginSource.m new file mode 100644 index 0000000..3f5f06e --- /dev/null +++ b/QSThingsPlugin/QSThingsPluginSource.m @@ -0,0 +1,59 @@ +#import "QSThingsPluginSource.h" +#import "Constants.h" +#import <QSCore/QSCore.h> + +@implementation QSThingsPluginSource + +#pragma mark - Lifecycle + +// This method will get called whenever we change which +// active entry is selected. +- (void)setSelectedEntry:(id)selectedEntry { +} + +#pragma mark - Quicksilver Source Methods + +- (BOOL)indexIsValidFromDate:(NSDate *)indexDate + forEntry:(NSDictionary *)theEntry { + return -[indexDate timeIntervalSinceNow] < 24 * 60 * 60; +} + +- (BOOL)isVisibleSource { + return YES; +} + +- (NSImage *)iconForEntry:(NSDictionary *)dict { + return [[NSBundle bundleForClass:[self class]] imageNamed:@"things"]; +} + +- (NSView *)settingsView { + if (![super settingsView]) { + [[NSBundle bundleForClass:[self class]] + loadNibNamed:NSStringFromClass([self class]) + owner:self + topLevelObjects:NULL]; + } + return [super settingsView]; +} + +#pragma mark - Objects For Entry + +- (NSArray *)objectsForEntry:(QSCatalogEntry *)theEntry { + return @[]; +} + +#pragma mark - Object Handler Methods + +- (void)setQuickIconForObject:(QSObject *)object { + // Not yet +} + +- (BOOL)objectHasChildren:(QSObject *)object { + return YES; +} + +- (BOOL)loadChildrenForObject:(QSObject *)object { + return YES; +} + +@end |