diff options
Diffstat (limited to 'Slimber/Cocoa/Menulet.m')
-rw-r--r-- | Slimber/Cocoa/Menulet.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Slimber/Cocoa/Menulet.m b/Slimber/Cocoa/Menulet.m index b2af97f..1cc1f1f 100644 --- a/Slimber/Cocoa/Menulet.m +++ b/Slimber/Cocoa/Menulet.m @@ -49,8 +49,10 @@ [statusMenu addItem: [[NSMenuItem alloc] initWithTitle: @"Online users:" action: NULL keyEquivalent: @""]]; int i; for (i = 0; i < [userNames count]; ++i) { - NSMenuItem* userItem = [[NSMenuItem alloc] initWithTitle: [@" " stringByAppendingString: [userNames objectAtIndex: i]] action: NULL keyEquivalent: @""]; + NSString* text = [NSString stringWithFormat: @" %@", [userNames objectAtIndex: i]]; + NSMenuItem* userItem = [[NSMenuItem alloc] initWithTitle: text action: NULL keyEquivalent: @""]; [statusMenu addItem: userItem]; + [userItem release]; } } else { @@ -75,6 +77,12 @@ [statusMenu addItem: loggedInItem]; [statusMenu addItem: [NSMenuItem separatorItem]]; + // About menu + NSMenuItem* aboutMenuItem = [[NSMenuItem alloc] initWithTitle: @"About Slimber" action: @selector(orderFrontStandardAboutPanel:) keyEquivalent: @""]; + [aboutMenuItem setTarget: [NSApplication sharedApplication]]; + [statusMenu addItem: aboutMenuItem]; + [statusMenu addItem: [NSMenuItem separatorItem]]; + // Exit item NSMenuItem* exitMenuItem = [[NSMenuItem alloc] initWithTitle: @"Exit" action: @selector(terminate:) keyEquivalent: @""]; [exitMenuItem setTarget: [NSApplication sharedApplication]]; |