summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Slimber/Cocoa/Menulet.m')
-rw-r--r--Slimber/Cocoa/Menulet.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/Slimber/Cocoa/Menulet.m b/Slimber/Cocoa/Menulet.m
index 02615ac..2f0f465 100644
--- a/Slimber/Cocoa/Menulet.m
+++ b/Slimber/Cocoa/Menulet.m
@@ -4,17 +4,22 @@
- (void) dealloc {
[statusItem release];
+ [menuIcon release];
[super dealloc];
}
- (void) awakeFromNib {
statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength: NSVariableStatusItemLength] retain];
[statusItem setHighlightMode: YES];
- [statusItem setTitle: [NSString stringWithFormat:@"%C",0x2295]];
[statusItem setEnabled: YES];
[statusItem setToolTip: @"Slimber"];
[statusItem setMenu: statusMenu];
+ NSBundle* bundle = [NSBundle bundleForClass: [self class]];
+ NSString* path = [bundle pathForResource: @"Offline" ofType:@"png"];
+ menuIcon = [[NSImage alloc] initWithContentsOfFile: path];
+ [statusItem setImage: menuIcon];
+
NSMenuItem* statusMenuItem = [[NSMenuItem alloc] initWithTitle: @"Online Users" action: NULL keyEquivalent:@""];
[statusMenu addItem: statusMenuItem];
[statusMenu addItem: [NSMenuItem separatorItem]];
@@ -29,4 +34,4 @@
[statusMenu insertItem: statusMenuItem atIndex:1];
}
-@end \ No newline at end of file
+@end