summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authorritsuka <[email protected]>2009-01-14 11:52:39 +0000
committerritsuka <[email protected]>2009-01-14 11:52:39 +0000
commit7ef1e7438c00ab280d78fa144d45014c805ff5f4 (patch)
tree924856876a5ce2446809ab907b27536ac694141b /macosx/Controller.mm
parent74a805b48c23f03e66c4c55976139acce6a4380c (diff)
MacGui: save the size of the presets drawer in the preferences.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2083 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm15
1 files changed, 11 insertions, 4 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index dbe8b3b1d..408ca253c 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -280,13 +280,16 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
/* Show/Dont Show Presets drawer upon launch based
on user preference DefaultPresetsDrawerShow*/
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow"] > 0)
+ if( [[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow"] > 0 )
{
+ [fPresetDrawer setDelegate:self];
+ NSSize drawerSize = NSSizeFromString( [[NSUserDefaults standardUserDefaults]
+ stringForKey:@"Drawer Size"] );
+ if( drawerSize.width )
+ [fPresetDrawer setContentSize: drawerSize];
[fPresetDrawer open];
}
-
-
-
+
/* Destination box*/
NSMenuItem *menuItem;
[fDstFormatPopUp removeAllItems];
@@ -1598,6 +1601,10 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
return NO;
}
+- (NSSize) drawerWillResizeContents:(NSDrawer *) drawer toSize:(NSSize) contentSize {
+ [[NSUserDefaults standardUserDefaults] setObject:NSStringFromSize( contentSize ) forKey:@"Drawer Size"];
+ return contentSize;
+}
#pragma mark -
#pragma mark Queue File