diff options
author | ritsuka <[email protected]> | 2014-11-11 13:30:09 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-11-11 13:30:09 +0000 |
commit | b84cb4347c8f67ac17f7f0591f80cf0cfc59c82f (patch) | |
tree | 5964b1047cb949a5d242e9919770a661cc964ecf /macosx | |
parent | 25762cfc44591c66bc77fba4b6fc5597b0d44532 (diff) |
MacGui: fixed an issue where the preset drawer would not open if the "Preset out of date" alert were displayed. Renamed some prefs key to avoid conflicts with previous versions.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6512 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 28 | ||||
-rw-r--r-- | macosx/HBPreferencesController.m | 2 |
2 files changed, 16 insertions, 14 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index b6fa82303..836e259ef 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -595,17 +595,25 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It [fScanIndicator setUsesThreadedAnimation:NO]; [fRipIndicator setUsesThreadedAnimation:NO]; + // Presets initialization + [self checkBuiltInsForUpdates]; + [self buildPresetsMenu]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildPresetsMenu) name:HBPresetsChangedNotification object:nil]; + [fPresetDrawer setDelegate:self]; NSSize drawerSize = NSSizeFromString([[NSUserDefaults standardUserDefaults] - stringForKey:@"Drawer Size"]); + stringForKey:@"HBDrawerSize"]); if (drawerSize.width) + { [fPresetDrawer setContentSize: drawerSize]; + } /* Show/Dont Show Presets drawer upon launch based - on user preference DefaultPresetsDrawerShow*/ - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow"]) + on user preference DefaultPresetsDrawerShow */ + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HBDefaultPresetsDrawerShow"]) { - [fPresetDrawer open]; + [fPresetDrawer open:self]; } /* Setup the start / stop popup */ @@ -705,12 +713,6 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It context:NULL]; [fWindow recalculateKeyViewLoop]; - - // Presets initialization - [self checkBuiltInsForUpdates]; - [self buildPresetsMenu]; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildPresetsMenu) name:HBPresetsChangedNotification object:nil]; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context @@ -2131,7 +2133,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It } - (NSSize) drawerWillResizeContents:(NSDrawer *) drawer toSize:(NSSize) contentSize { - [[NSUserDefaults standardUserDefaults] setObject:NSStringFromSize( contentSize ) forKey:@"Drawer Size"]; + [[NSUserDefaults standardUserDefaults] setObject:NSStringFromSize( contentSize ) forKey:@"HBDrawerSize"]; return contentSize; } @@ -4689,11 +4691,11 @@ the user is using "Custom" settings by determining the sender*/ { if ([fPresetDrawer state] == NSDrawerClosedState) { - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"DefaultPresetsDrawerShow"]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HBDefaultPresetsDrawerShow"]; } else { - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"DefaultPresetsDrawerShow"]; + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"HBDefaultPresetsDrawerShow"]; } [fPresetDrawer toggle:self]; diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index d1740f9b4..3e9666e6c 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -61,7 +61,7 @@ @"DefaultLanguage": @"English", @"DefaultMpegExtension": @"Auto", @"UseDvdNav": @"YES", - @"DefaultPresetsDrawerShow": @YES, + @"HBDefaultPresetsDrawerShow": @YES, @"LastDestinationDirectory": desktopDirectory, @"LastSourceDirectory": desktopDirectory, @"DefaultAutoNaming": @NO, |