diff --git a/src/macos/AboutBox.h b/src/macos/AboutBox.h index 31c17486b..1da55530e 100644 --- a/src/macos/AboutBox.h +++ b/src/macos/AboutBox.h @@ -25,6 +25,8 @@ */ @interface AboutBox : NSObject +@property (nonatomic, strong) IBOutlet NSWindow *theWindow; + + (AboutBox *)sharedInstance; - (IBAction)showPanel:(id)sender; - (IBAction)OK:(id)sender; diff --git a/src/macos/AboutBox.m b/src/macos/AboutBox.m index 388f76d49..15f8d5d2c 100644 --- a/src/macos/AboutBox.m +++ b/src/macos/AboutBox.m @@ -52,7 +52,6 @@ static AboutBox *sharedInstance = nil; if (!appNameField) { - NSWindow *theWindow; NSString *creditsPath; NSAttributedString *creditsString; NSString *appName; @@ -61,13 +60,13 @@ static AboutBox *sharedInstance = nil; CFBundleRef localInfoBundle; NSDictionary *localInfoDict; - if (![NSBundle loadNibNamed:@"AboutBox" owner:self]) + if (![[NSBundle mainBundle] loadNibNamed:@"AboutBox" owner:self topLevelObjects:nil]) { NSLog( @"Failed to load AboutBox.nib" ); NSBeep(); return; } - theWindow = [appNameField window]; + self.theWindow = [appNameField window]; // Get the info dictionary (Info.plist) infoDictionary = [[NSBundle mainBundle] infoDictionary]; @@ -81,7 +80,7 @@ static AboutBox *sharedInstance = nil; [appNameField setStringValue:appName]; // Set the about box window title - [theWindow setTitle:[NSString stringWithFormat:@"About %@", appName]]; + [self.theWindow setTitle:[NSString stringWithFormat:@"About %@", appName]]; // Setup the version field versionString = [infoDictionary objectForKey:@"CFBundleVersion"]; @@ -106,9 +105,9 @@ static AboutBox *sharedInstance = nil; maxScrollHeight = creditsBounds.size.height*2.75; // Setup the window - [theWindow setExcludedFromWindowsMenu:YES]; - [theWindow setMenu:nil]; - [theWindow center]; + [self.theWindow setExcludedFromWindowsMenu:YES]; + [self.theWindow setMenu:nil]; + [self.theWindow center]; } if (![[appNameField window] isVisible]) diff --git a/src/macos/stella.xcodeproj/project.pbxproj b/src/macos/stella.xcodeproj/project.pbxproj index b404a5f53..13ea9ff3b 100644 --- a/src/macos/stella.xcodeproj/project.pbxproj +++ b/src/macos/stella.xcodeproj/project.pbxproj @@ -3629,7 +3629,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_INTERFACE_IVARS = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; + CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES; @@ -3706,7 +3706,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_INTERFACE_IVARS = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; + CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;