summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-04-18 14:51:38 +0000
committerdynaflash <[email protected]>2007-04-18 14:51:38 +0000
commit5c320cb5f6af0372cadde22b95a27b87b18ca3f1 (patch)
tree537d05845cc2752cb8035cdd2d859c8daadb23b8 /macosx
parentd2e927f0577062999b2ede20b12f91f03ed703e4 (diff)
MacGui: Clean up a few things w/x264optstring prefs and presets
- Change abr of AppleTV built in preset to 2500 kbps - Note: as usual, after updating your copy, use "Update Built-In Presets" in the presets menu for changes to take effect. - Fix so that closing picture window does not reset the preset chosen display to "Custom" - Add a user preference to show or hide the chosen x264 option strings in the main gui window. Defaults to off. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@525 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.mm29
-rw-r--r--macosx/English.lproj/MainMenu.nib/classes.nib3
-rw-r--r--macosx/English.lproj/MainMenu.nib/info.nib8
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin100591 -> 99292 bytes
-rw-r--r--macosx/PrefsController.h4
-rw-r--r--macosx/PrefsController.m22
6 files changed, 47 insertions, 19 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 95f43b548..6a8bd095e 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1700,8 +1700,11 @@ static int FormatSettings[3][4] =
{
[fPicSettingPARDsply setStringValue: @"Off"];
}
-
- [self CustomSettingUsed: sender];
+ /* below will trigger the preset, if selected, to be
+ changed to "Custom". Lets comment out for now until
+ we figure out a way to determine if the picture values
+ changed modify the preset values */
+ //[self CustomSettingUsed: sender];
}
- (IBAction) CalculateBitrate: (id) sender
@@ -1739,11 +1742,14 @@ the user is using "Custom" settings by determining the sender*/
[fDisplayX264Options setStringValue: @""];
curUserPresetChosenNum = nil;
/* If we have MP4, AVC H.264 and x264 Main then we look to see
- if there are any x264 options from the preferences to use */
+ if there are any x264 options from the preferences to use */
if ([fDstFormatPopUp indexOfSelectedItem] == 0 && [fDstCodecsPopUp indexOfSelectedItem] == 1)
{
- //[fDisplayX264Options setStringValue: [NSString stringWithFormat:[chosenPreset valueForKey:@"x264Option"]]];
- [fDisplayX264Options setStringValue: [NSString stringWithFormat:[[NSUserDefaults standardUserDefaults] stringForKey:@"DefAdvancedx264Flags"]]];
+ /* Lets check to see if the user wants them displayed from the preferences */
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefAdvancedx264FlagsShow"] > 0)
+ {
+ [fDisplayX264Options setStringValue: [NSString stringWithFormat:[[NSUserDefaults standardUserDefaults] stringForKey:@"DefAdvancedx264Flags"]]];
+ }
}
}
@@ -1889,8 +1895,7 @@ the user is using "Custom" settings by determining the sender*/
[preset setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"];
/* x264 Option String */
[preset setObject:[fPresetNewX264Opt stringValue] forKey:@"x264Option"];
- //[fDisplayX264Options setStringValue: [NSString stringWithFormat: @"Using Option: %@",CurUserPresetx264Opt]];
- /* Video quality */
+
[preset setObject:[NSNumber numberWithInt:[fVidQualityMatrix selectedRow]] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
[preset setObject:[fVidBitrateField stringValue] forKey:@"VideoAvgBitrate"];
@@ -2051,7 +2056,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
- [preset setObject:@"3000" forKey:@"VideoAvgBitrate"];
+ [preset setObject:@"2500" forKey:@"VideoAvgBitrate"];
[preset setObject:[NSNumber numberWithFloat:[fVidQualitySlider floatValue]] forKey:@"VideoQualitySlider"];
/* Video framerate */
@@ -2235,8 +2240,12 @@ the user is using "Custom" settings by determining the sender*/
[fVidEncoderPopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"VideoEncoder"]]];
/* We can show the preset options here in the gui if we want to
- Field is currently hidden from user, unhide it if we need to test */
- [fDisplayX264Options setStringValue: [NSString stringWithFormat:[chosenPreset valueForKey:@"x264Option"]]];
+ so we check to see it the user has specified it in the prefs */
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefAdvancedx264FlagsShow"] > 0)
+ {
+ [fDisplayX264Options setStringValue: [NSString stringWithFormat:[chosenPreset valueForKey:@"x264Option"]]];
+ }
+
/* Lets run through the following functions to get variables set there */
[self EncoderPopUpChanged: NULL];
[self CalculateBitrate: NULL];
diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib
index 6205a2dcc..f10ce5e60 100644
--- a/macosx/English.lproj/MainMenu.nib/classes.nib
+++ b/macosx/English.lproj/MainMenu.nib/classes.nib
@@ -195,7 +195,8 @@
CLASS = PrefsController;
LANGUAGE = ObjC;
OUTLETS = {
- fDefAdvancedx264FlagsView = NSButton;
+ fDefAdvancedx264FlagsShow = NSButton;
+ fDefAdvancedx264FlagsView = NSTextField;
fDefAutoNaming = NSButton;
fDefChapterMarkers = NSButton;
fDefCrf = NSButton;
diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib
index 5ec8a74df..6c0f51e56 100644
--- a/macosx/English.lproj/MainMenu.nib/info.nib
+++ b/macosx/English.lproj/MainMenu.nib/info.nib
@@ -9,7 +9,7 @@
<key>1843</key>
<string>610 276 220 592 0 0 1440 878 </string>
<key>29</key>
- <string>16 1134 365 44 0 0 1920 1178 </string>
+ <string>11 834 365 44 0 0 1440 878 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
@@ -19,9 +19,11 @@
</array>
<key>IBOpenObjects</key>
<array>
- <integer>1438</integer>
- <integer>1867</integer>
<integer>29</integer>
+ <integer>1867</integer>
+ <integer>1438</integer>
+ <integer>365</integer>
+ <integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>8P2137</string>
diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
index be60a3839..3a3dd72ce 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/macosx/PrefsController.h b/macosx/PrefsController.h
index 2d298a515..c6a66be62 100644
--- a/macosx/PrefsController.h
+++ b/macosx/PrefsController.h
@@ -16,7 +16,9 @@
IBOutlet NSButton * fDefAutoNaming;
IBOutlet NSButton * fDefChapterMarkers;
- IBOutlet NSTextView * fDefAdvancedx264FlagsView;
+ IBOutlet NSTextField * fDefAdvancedx264FlagsView;
+ IBOutlet NSButton * fDefAdvancedx264FlagsShow;
+
}
- (IBAction) OpenPanel: (id) sender;
diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m
index 4c9121e57..6f98fa214 100644
--- a/macosx/PrefsController.m
+++ b/macosx/PrefsController.m
@@ -24,6 +24,8 @@
forKey:@"DefaultPicSizeAutoiPod"];
appDefaults = [NSDictionary dictionaryWithObject:@"NO"
forKey:@"PixelRatio"];
+ appDefaults = [NSDictionary dictionaryWithObject:@"NO"
+ forKey:@"DefAdvancedx264FlagsShow"];
appDefaults = [NSDictionary dictionaryWithObject:@""
forKey:@"DefAdvancedx264Flags"];
appDefaults = [NSDictionary dictionaryWithObject:@"YES"
@@ -40,7 +42,8 @@
forKey:@"DefaultAutoNaming"];
appDefaults = [NSDictionary dictionaryWithObject:@"NO"
forKey:@"DefaultChapterMarkers"];
- [defaults registerDefaults: appDefaults];
+
+ [defaults registerDefaults: appDefaults];
/* fUpdateCheck Check or uncheck according to the preferences */
[fUpdateCheck setState: [defaults boolForKey:@"CheckForUpdates"] ?
@@ -244,10 +247,13 @@
[fDefPixelRatio setState: [defaults boolForKey:@"PixelRatio"] ?
NSOnState : NSOffState];
+ /* fDefAdvancedx264FlagsShow */
+ [fDefAdvancedx264FlagsShow setState: [defaults boolForKey:@"DefAdvancedx264FlagsShow"] ?
+ NSOnState : NSOffState];
/* Insert default DefAdvanced x264 Flag here */
if ([defaults stringForKey:@"DefAdvancedx264Flags"]!=NULL)
{
- [fDefAdvancedx264FlagsView setString:[defaults stringForKey:@"DefAdvancedx264Flags"]];
+ [fDefAdvancedx264FlagsView setStringValue:[defaults stringForKey:@"DefAdvancedx264Flags"]];
}
/* fDefPresetDrawerShow Check or uncheck according to the preferences*/
@@ -347,10 +353,18 @@
{
[defaults setObject:@"NO" forKey:@"PixelRatio"];
}
-
+ /* Show Chosen Advanced Flags to be used in main window*/
+ if( [fDefAdvancedx264FlagsShow state] == NSOnState )
+ {
+ [defaults setObject:@"YES" forKey:@"DefAdvancedx264FlagsShow"];
+ }
+ else
+ {
+ [defaults setObject:@"NO" forKey:@"DefAdvancedx264FlagsShow"];
+ }
/*Advanced x264 Flag string into */
- [defaults setObject:[fDefAdvancedx264FlagsView string] forKey:@"DefAdvancedx264Flags"];
+ [defaults setObject:[fDefAdvancedx264FlagsView stringValue] forKey:@"DefAdvancedx264Flags"];
/* Show Presets Drawer upon launch*/