From 251a05c305a72b085bf9beb096a12683b2ca13cf Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 8 Aug 2006 11:37:54 +0000 Subject: [PATCH] Code for saving when closing prefs window is no longer a delegate method. --- macosx/PrefsController.m | 4 +--- macosx/PrefsWindow.m | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index 8024c1585..75a92d576 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -77,9 +77,7 @@ fDefaults = [NSUserDefaults standardUserDefaults]; fHandle = handle; - NSWindow * window = [self window]; - [window setDelegate: window]; - [window update]; //make sure nib is loaded right away + [[self window] update]; //make sure nib is loaded right away } return self; } diff --git a/macosx/PrefsWindow.m b/macosx/PrefsWindow.m index 6e4f59b2a..e25968898 100644 --- a/macosx/PrefsWindow.m +++ b/macosx/PrefsWindow.m @@ -33,9 +33,10 @@ [self close]; } -- (void) windowWillClose: (NSNotification *) notification +- (void) close { [self makeFirstResponder: nil]; //essentially saves changes on window close + [super close]; } @end