blob: f73b5cadce01dba484199ca2cd66cab23733b6e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 [QSResourceManager imageNamed:@"com.culturedcode.ThingsMac"];
}
- (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 {
[object setIcon:[QSResourceManager imageNamed:@"com.culturedcode.ThingsMac"]];
}
- (BOOL)objectHasChildren:(QSObject *)object {
return YES;
}
- (BOOL)loadChildrenForObject:(QSObject *)object {
return YES;
}
@end
|