summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-11-11 13:30:09 +0000
committerritsuka <[email protected]>2014-11-11 13:30:09 +0000
commitb84cb4347c8f67ac17f7f0591f80cf0cfc59c82f (patch)
tree5964b1047cb949a5d242e9919770a661cc964ecf /macosx/Controller.m
parent25762cfc44591c66bc77fba4b6fc5597b0d44532 (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/Controller.m')
-rw-r--r--macosx/Controller.m28
1 files changed, 15 insertions, 13 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];