Skip to content

Instantly share code, notes, and snippets.

@alexanderweiss
Created December 5, 2009 12:18
Show Gist options
  • Save alexanderweiss/249664 to your computer and use it in GitHub Desktop.
Save alexanderweiss/249664 to your computer and use it in GitHub Desktop.
@import <Foundation/CPObject.j>
@implementation AOUserPullDownButton : CPPopUpButton
{
CPMenuItem nameItem;
CPMenuItem loginItem;
CPMenuItem logoutItem;
CPMenuItem preferencesItem;
}
- (void)initAO
{
nameItem = [[CPMenuItem alloc] initWithTitle:"Gast" action:null keyEquivalent:-1];
loginItem = [[CPMenuItem alloc] initWithTitle:"Inloggen" action:@selector(showLoginWindow:) keyEquivalent:-1];
//logoutItem = [[CPMenuItem alloc] initWithTitle:"Uitloggen" action:@selector(logout:) keyEquivalent:-1];
//preferencesItem = [[CPMenuItem alloc] initWithTitle:"Voorkeuren" action:@selector(showPreferencesWindow:) keyEquivalent:-1];
//[self removeAllItems];
[self addItem:nameItem];
[self addItem:loginItem];
}
- (id)initWithFrame:(CGRect)aFrame
{
if (self = [super initWithFrame:aFrame])
{
[self initAO];
}
return self;
}
- (id)initWithCoder:(CPCoder)aCoder
{
if (self = [super initWithCoder:aCoder])
{
[self initAO];
}
return self;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment