diff options
-rw-r--r-- | macosx/Controller.mm | 15 | ||||
-rw-r--r-- | macosx/HBPreferencesController.m | 5 |
2 files changed, 14 insertions, 6 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 diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index 8f6997079..ca80223c8 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -55,8 +55,9 @@ @"NO", @"DisableDvdAutoDetect", @"Alert Window", @"AlertWhenDone", @"1", @"LoggingLevel", - @"NO", @"EncodeLogLocation", - @"10", @"PreviewsNumber", + @"NO", @"EncodeLogLocation", + @"10", @"PreviewsNumber", + @"", @"Drawer Size", nil]]; } |