diff --git a/English.lproj/MainMenu.nib/designable.nib b/English.lproj/MainMenu.nib/designable.nib index 870446c..15f91f8 100644 --- a/English.lproj/MainMenu.nib/designable.nib +++ b/English.lproj/MainMenu.nib/designable.nib @@ -9,7 +9,7 @@ YES - + YES @@ -388,7 +388,7 @@ RyderController - + YES windowHeight @@ -496,14 +496,6 @@ 390 - - - delegate - - - - 392 - enableSpeech: @@ -528,22 +520,14 @@ 438 - - - window - - - - 439 - contentWidth: values.windowWidth - + - + contentWidth: values.windowWidth contentWidth values.windowWidth @@ -552,6 +536,22 @@ 447 + + + delegate + + + + 448 + + + + window + + + + 449 + @@ -822,7 +822,7 @@ 440 - + @@ -1017,7 +1017,7 @@ - 447 + 449 diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib index faa546c..b7fedea 100644 Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/RyderController.h b/RyderController.h index 93fbd92..17cede1 100644 --- a/RyderController.h +++ b/RyderController.h @@ -28,9 +28,6 @@ -(IBAction)newName:(id)sender; -(IBAction)enableSpeech:(NSButton*)sender; --(void)applicationWillFinishLaunching:(NSNotification*)notification; --(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication; - // In Interface Builder, make a 'delegate' connection // from File's Owner to Ryder Controller. diff --git a/RyderController.m b/RyderController.m index 678a11f..9c623b4 100644 --- a/RyderController.m +++ b/RyderController.m @@ -3,6 +3,7 @@ // (c) 2008-2009 Liam Cooke // MIT Licensed -- see LICENSE.txt +#import #import "RyderController.h" #import "RyderNamer.h" @@ -14,7 +15,8 @@ @implementation RyderController -(id)init { - if (self = [super init]) { + self = [super init]; + if (self) { ryder = [[RyderNamer alloc] init]; speechEnabled = NO; //[[NSUserDefaults standardUserDefaults] boolForKey:speakNames]; @@ -67,13 +69,17 @@ -(IBAction)enableSpeech:(NSButton*)sender -(void)awakeFromNib { + [window setDelegate:self]; [window center]; } -(void)applicationWillFinishLaunching:(NSNotification*)notification { PFMoveToApplicationsFolderIfNecessary(); + + [window setAlphaValue:0.0]; [window makeKeyAndOrderFront:self]; + [window.animator setAlphaValue:1.0]; } -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication @@ -81,4 +87,10 @@ -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplic return YES; } +-(BOOL)windowShouldClose:(id)theWindow +{ + //[window.animator setAlphaValue:0.0]; + return YES; +} + @end