diff options
author | ritsuka <[email protected]> | 2009-01-14 11:52:39 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2009-01-14 11:52:39 +0000 |
commit | 7ef1e7438c00ab280d78fa144d45014c805ff5f4 (patch) | |
tree | 924856876a5ce2446809ab907b27536ac694141b /macosx/Controller.mm | |
parent | 74a805b48c23f03e66c4c55976139acce6a4380c (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.mm | 15 |
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 |