From 64f2745dfa02bdb9e5a542b52e4074ee02bf8d46 Mon Sep 17 00:00:00 2001 From: Kevin LaCoste Date: Tue, 16 Mar 2010 13:27:34 +0900 Subject: [PATCH] Make the Preferences window a panel. This enables the standard behaviour of dismissing the panel with the key. --- DBPrefsWindowController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DBPrefsWindowController.m b/DBPrefsWindowController.m index 3988a99..64a13c6 100644 --- a/DBPrefsWindowController.m +++ b/DBPrefsWindowController.m @@ -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];