Skip to content

Instantly share code, notes, and snippets.

@nickjs
Created October 8, 2008 20:27
Show Gist options
  • Save nickjs/15577 to your computer and use it in GitHub Desktop.
Save nickjs/15577 to your computer and use it in GitHub Desktop.
var kLEDefaultPreferencesController;
@implementation LEPreferencesController : CPWindowController
{
}
+ (id)defaultController
{
if(!kLEDefaultPreferencesController)
kLEDefaultPreferencesController = [[LEPreferencesController alloc] init];
return kLEDefaultPreferencesController;
}
- (id)init
{
self = [super initWithWindow:[[CPWindow alloc] initWithContentRect:CGRectMake(0,0,300,300) styleMask:CPHUDBackgroundWindowMask | CPClosableWindowMask]];
if(self)
{
[_window center];
}
return self;
}
- (void)openPreferences:(id)sender
{
[self showWindow:sender];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment