diff options
author | ritsuka <[email protected]> | 2015-01-22 10:47:23 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-22 10:47:23 +0000 |
commit | a6336a4841332056a538c4488ca7a410b6444ec7 (patch) | |
tree | d5f48f7a287add23cfdf1aaee5f7a10d860bb018 /macosx/HBPreferencesController.m | |
parent | 2c6880d133a3cd720369bc9164609dab645ba23f (diff) |
MacGui: center the prefs window in the showWindow: method.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6786 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreferencesController.m')
-rw-r--r-- | macosx/HBPreferencesController.m | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index e53878cca..22d9fcab8 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -90,12 +90,11 @@ * Initializes the preferences controller by loading Preferences.nib file. * */ -- (id)init +- (instancetype)init { if (self = [super initWithWindowNibName:@"Preferences"]) { _languages = [[HBLanguagesSelection alloc] init]; - NSAssert([self window], @"[HBPreferencesController init] window outlet is not connected in Preferences.nib"); } return self; } @@ -106,6 +105,16 @@ [super dealloc]; } +- (void)showWindow:(id)sender +{ + if (!self.window.isVisible) + { + [self.window center]; + } + + [super showWindow:sender]; +} + /** * -[HBPreferencesController awakeFromNib] * |