Skip to content

Commit 64f2745

Browse files
klacostedgrijalva
authored andcommitted
Make the Preferences window a panel.
This enables the standard behaviour of dismissing the panel with the <esc> key.
1 parent b87f9b0 commit 64f2745

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DBPrefsWindowController.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ - (void)windowDidLoad
7474
// Create a new window to display the preference views.
7575
// If the developer attached a window to this controller
7676
// in Interface Builder, it gets replaced with this one.
77-
NSWindow *window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
77+
NSPanel *panel = [[[NSPanel alloc] initWithContentRect:NSMakeRect(0,0,1000,1000)
7878
styleMask:(NSTitledWindowMask |
7979
NSClosableWindowMask |
8080
NSMiniaturizableWindowMask)
8181
backing:NSBackingStoreBuffered
8282
defer:YES] autorelease];
83-
[self setWindow:window];
83+
[self setWindow:panel];
8484
contentSubview = [[[NSView alloc] initWithFrame:[[[self window] contentView] frame]] autorelease];
8585
[contentSubview setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)];
8686
[[[self window] contentView] addSubview:contentSubview];

0 commit comments

Comments
 (0)