From: dynaflash Date: Wed, 14 Feb 2007 21:19:25 +0000 (+0000) Subject: Mac GUI - Added x264 advanced encoding command flag preference. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=391863e49052ee009c8963a711d2a1ce5212ca5a;p=handbrake Mac GUI - Added x264 advanced encoding command flag preference. - NSTextView to enter advanced encoding flags (jbrjake) to pass to x264. - NOT incorporated into Controller.mm at all yet. - Accessible in Controller.mm via: [NSUserDefaults standardUserDefaults] stringForKey:@"DefAdvancedx264Flags"] Mac GUI - Fixed copy/paste in all text fields including destination file location. git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.8.0_beta2_5.1@331 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib index d431a2c95..e93e433ac 100644 --- a/macosx/English.lproj/MainMenu.nib/classes.nib +++ b/macosx/English.lproj/MainMenu.nib/classes.nib @@ -169,6 +169,7 @@ CLASS = PrefsController; LANGUAGE = ObjC; OUTLETS = { + fDefAdvancedx264FlagsView = NSTextView; fDefAudioSurround = NSButton; fDefCrf = NSButton; fDefDeinterlace = NSButton; diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index 7ae790b10..5f53222db 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -7,7 +7,7 @@ IBEditorPositions 29 - 69 330 258 44 0 0 1440 878 + 102 834 258 44 0 0 1440 878 IBFramework Version 446.1 diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib index 199fdd2ea..1ca85822d 100644 Binary files a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib and b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/macosx/PrefsController.h b/macosx/PrefsController.h index 422c3c313..2aa72b940 100644 --- a/macosx/PrefsController.h +++ b/macosx/PrefsController.h @@ -14,7 +14,7 @@ IBOutlet NSButton * fDefPixelRatio; IBOutlet NSButton * fDefAudioSurround; - + IBOutlet NSTextView * fDefAdvancedx264FlagsView; } - (IBAction) OpenPanel: (id) sender; diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index ed62a2770..78586d95c 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -8,7 +8,7 @@ NSDictionary * appDefaults; /* Unless the user specified otherwise, default is to check - for update fDefAudioSurround*/ + for update DefAdvancedx264Flags*/ defaults = [NSUserDefaults standardUserDefaults]; appDefaults = [NSDictionary dictionaryWithObject:@"YES" forKey:@"CheckForUpdates"]; @@ -26,6 +26,8 @@ forKey:@"PixelRatio"]; appDefaults = [NSDictionary dictionaryWithObject:@"NO" forKey:@"DefaultSurroundSound"]; + appDefaults = [NSDictionary dictionaryWithObject:@"" + forKey:@"DefAdvancedx264Flags"]; [defaults registerDefaults: appDefaults]; @@ -215,26 +217,29 @@ /* fFileExtItunes Check or uncheck according to the preferences */ [fFileExtItunes setState: [defaults boolForKey:@"DefaultMpegName"] ? - NSOnState : NSOffState]; - - /* fDefCrf Check or uncheck according to the preferences*/ + NSOnState : NSOffState]; + + /* fDefCrf Check or uncheck according to the preferences*/ [fDefCrf setState: [defaults boolForKey:@"DefaultCrf"] ? - NSOnState : NSOffState]; - + NSOnState : NSOffState]; + /* fDefDeinterlace Check or uncheck according to the preferences*/ [fDefDeinterlace setState: [defaults boolForKey:@"DefaultDeinterlaceOn"] ? - NSOnState : NSOffState]; - -/* fDefPicSizeAutoSetipod Check or uncheck according to the preferences*/ + NSOnState : NSOffState]; + + /* fDefPicSizeAutoSetipod Check or uncheck according to the preferences*/ [fDefPicSizeAutoSetipod setState: [defaults boolForKey:@"DefaultPicSizeAutoiPod"] ? - NSOnState : NSOffState]; - /* fDefPixelRatio */ + NSOnState : NSOffState]; + /* fDefPixelRatio */ [fDefPixelRatio setState: [defaults boolForKey:@"PixelRatio"] ? - NSOnState : NSOffState]; - - /* fDefAudioSurround Check or uncheck according to the preferences */ + NSOnState : NSOffState]; + + /* fDefAudioSurround Check or uncheck according to the preferences */ [fDefAudioSurround setState: [defaults boolForKey:@"DefaultSurroundSound"] ? - NSOnState : NSOffState]; + NSOnState : NSOffState]; + + /* Insert default DefAdvanced x264 Flag here */ + [fDefAdvancedx264FlagsView setString:[defaults stringForKey:@"DefAdvancedx264Flags"]]; } @@ -245,6 +250,7 @@ - (IBAction) ClosePanel: (id) sender; { + [self CheckChanged: sender]; [NSApp stopModal]; [fPanel orderOut: sender]; } @@ -334,7 +340,10 @@ { [defaults setObject:@"NO" forKey:@"DefaultSurroundSound"]; } - + + + /*Advanced x264 Flag string into */ + [defaults setObject:[fDefAdvancedx264FlagsView string] forKey:@"DefAdvancedx264Flags"]; } @end