-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTomatoGrowl.m
52 lines (42 loc) · 1.19 KB
/
TomatoGrowl.m
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
#import "TomatoGrowl.h"
@implementation TomatoGrowl
- (id)init {
if (self = [super init]) {
[GrowlApplicationBridge setGrowlDelegate:self];
}
return self;
}
- (BOOL)isEnabled {
return YES;
}
- (NSDictionary *)registrationDictionaryForGrowl {
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
NSArray *notifications = [[NSArray alloc] initWithObjects:@"Tomato Ended", @"Break Ended", nil];
[dict setObject:notifications forKey:GROWL_NOTIFICATIONS_ALL];
[dict setObject:notifications forKey:GROWL_NOTIFICATIONS_DEFAULT];
return dict;
}
- (NSString *)applicationNameForGrowl {
return @"Tomato";
}
- (void)tomatoEnded:(NSNotification *)notification {
[GrowlApplicationBridge
notifyWithTitle:@"Tomato Ended"
description:@"Tomato Ended"
notificationName:@"Tomato Ended"
iconData:nil
priority:0
isSticky:NO
clickContext:nil];
}
- (void)breakEnded:(NSNotification *)notification {
[GrowlApplicationBridge
notifyWithTitle:@"Break Ended"
description:@"Break Ended"
notificationName:@"Break Ended"
iconData:nil
priority:0
isSticky:NO
clickContext:nil];
}
@end