diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-09-10 11:32:28 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-09-10 11:32:28 +0200 |
| commit | c791858db3de3568f0ea2839c79b360a0dfb15ab (patch) | |
| tree | 7cf50c93cdf03075d10c14c8ad1f7a646b2a05c7 /QSThingsPlugin/QSThingsPluginSource.m | |
Initial commit
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 |