summaryrefslogtreecommitdiffstats
path: root/macosx
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
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')
-rw-r--r--macosx/Controller.mm15
-rw-r--r--macosx/HBPreferencesController.m5
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]];
}