|
@@ -10,13 +10,19 @@
|
10
|
10
|
|
11
|
11
|
@interface AppDelegate ()
|
12
|
12
|
|
13
|
|
-@property (weak) IBOutlet NSWindow *window;
|
14
|
13
|
@end
|
15
|
14
|
|
16
|
15
|
@implementation AppDelegate
|
17
|
16
|
|
|
17
|
+@synthesize statusMenu, statusItem, statusImage;
|
|
18
|
+
|
18
|
19
|
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
19
|
|
- // Insert code here to initialize your application
|
|
20
|
+ statusImage = [NSImage imageNamed:@"MenuIcon"];
|
|
21
|
+ [statusImage setTemplate:YES];
|
|
22
|
+
|
|
23
|
+ statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength];
|
|
24
|
+ [statusItem setImage:statusImage];
|
|
25
|
+ [statusItem setMenu:statusMenu];
|
20
|
26
|
}
|
21
|
27
|
|
22
|
28
|
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|