mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Make the Preferences window a panel.
This enables the standard behaviour of dismissing the panel with the <esc> key.
This commit is contained in:
committed by
Dave Grijalva
parent
b87f9b0e35
commit
64f2745dfa
@@ -74,13 +74,13 @@ static DBPrefsWindowController *_sharedPrefsWindowController = nil;
|
||||
// Create a new window to display the preference views.
|
||||
// If the developer attached a window to this controller
|
||||
// in Interface Builder, it gets replaced with this one.
|
||||
NSWindow *window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
|
||||
NSPanel *panel = [[[NSPanel alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
|
||||
styleMask:(NSTitledWindowMask |
|
||||
NSClosableWindowMask |
|
||||
NSMiniaturizableWindowMask)
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES] autorelease];
|
||||
[self setWindow:window];
|
||||
[self setWindow:panel];
|
||||
contentSubview = [[[NSView alloc] initWithFrame:[[[self window] contentView] frame]] autorelease];
|
||||
[contentSubview setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)];
|
||||
[[[self window] contentView] addSubview:contentSubview];
|
||||
|
||||
Reference in New Issue
Block a user