Created
December 5, 2009 12:18
-
-
Save alexanderweiss/249664 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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