From c791858db3de3568f0ea2839c79b360a0dfb15ab Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Wed, 10 Sep 2025 11:32:28 +0200 Subject: Initial commit --- QSThingsPlugin/QSThingsPluginSource.m | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 QSThingsPlugin/QSThingsPluginSource.m (limited to 'QSThingsPlugin/QSThingsPluginSource.m') 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 + +@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 -- cgit