summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-04-16 20:59:16 +0000
committerdynaflash <[email protected]>2007-04-16 20:59:16 +0000
commit3aff3e3e8ae0a6015d07800c48194f46e2e5be8e (patch)
tree4828ea49c28c7e093ea57a597eccf80a4e9ef29d /macosx
parent5ed496ef19a95b56b1236fce2b78d2c9a8a4767f (diff)
MacGui: Fix Presets mangling the x264 option strings for the umpteenth time.
- Replace the Optional x264 string NSTextView with an NSTextField - Change when the field is emptied after creation. - Reset the value of the ChickenSandwich. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@516 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.h2
-rw-r--r--macosx/Controller.mm80
-rw-r--r--macosx/English.lproj/MainMenu.nib/classes.nib2
-rw-r--r--macosx/English.lproj/MainMenu.nib/info.nib2
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin102045 -> 101095 bytes
5 files changed, 44 insertions, 42 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h
index dd366dd98..6666e3c35 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -132,7 +132,7 @@
IBOutlet NSDrawer * fPresetDrawer;
IBOutlet NSTextField * fPresetNewName;
- IBOutlet NSTextView * fPresetNewX264Opt;
+ IBOutlet NSTextField * fPresetNewX264Opt;
IBOutlet NSTextField * fPresetNewX264OptLabel;
IBOutlet NSButton * fPresetNewPicSettingsApply;
IBOutlet NSTextField * fPresetSelectedDisplay;
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 0849cd0fd..c80ae3ed9 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -587,7 +587,7 @@ static int FormatSettings[3][4] =
fPicLabelAr,fPicLabelDeinter,fPicLabelSrcX,fPicLabelOutputX,
fPicLabelPAROutp,fPicLabelPAROutputX,fPicSettingPARWidth,fPicSettingPARHeight,
fPicSettingPARDsply,fPicLabelAnamorphic,tableView,fPresetsAdd,fPresetsDelete,
- fCreateChapterMarkers,fPresetNewX264OptLabel};
+ fCreateChapterMarkers,fPresetNewX264OptLabel,fDisplayX264Options};
for( unsigned i = 0;
i < sizeof( controls ) / sizeof( NSControl * ); i++ )
@@ -1729,42 +1729,6 @@ the user is using "Custom" settings by determining the sender*/
}
-- (IBAction) ShowAddPresetPanel: (id) sender
-{
- /* Deselect the currently selected Preset if there is one*/
- [tableView deselectRow:[tableView selectedRow]];
- /* If we have MP4, AVC H.264 and Main then we enable the x264 Options field for the
- Add Preset window we are about to open. We do this before we actually open the panel,
- as doing it after causes it to stick from the last selection for some reason. */
- if ([fDstFormatPopUp indexOfSelectedItem] == 0 && [fDstCodecsPopUp indexOfSelectedItem] == 1)
- {
- [fPresetNewX264Opt setEditable: YES];
- [fPresetNewX264OptLabel setEnabled: YES];
- }
- else
- {
- [fPresetNewX264Opt setEditable: NO];
- [fPresetNewX264OptLabel setEnabled: NO];
- }
- /* Erase info from the input fields */
- [fPresetNewName setStringValue: @""];
- [fPresetNewX264Opt setString:@""];
- /* Show the panel */
- [NSApp beginSheet: fAddPresetPanel modalForWindow: fWindow
- modalDelegate: NULL didEndSelector: NULL contextInfo: NULL];
- [NSApp runModalForWindow: fAddPresetPanel];
- [NSApp endSheet: fAddPresetPanel];
- [fAddPresetPanel orderOut: self];
-
-
-}
-- (IBAction) CloseAddPresetPanel: (id) sender
-{
- /* Erase info from the input fields */
- [fPresetNewName setStringValue: @""];
- [fPresetNewX264Opt setString:@""];
- [NSApp stopModal];
-}
/* We use this method to recreate new, updated factory
presets */
- (IBAction)AddFactoryPresets:(id)sender
@@ -1805,11 +1769,49 @@ the user is using "Custom" settings by determining the sender*/
}
+- (IBAction) ShowAddPresetPanel: (id) sender
+{
+ /* Deselect the currently selected Preset if there is one*/
+ [tableView deselectRow:[tableView selectedRow]];
+ /* If we have MP4, AVC H.264 and Main then we enable the x264 Options field for the
+ Add Preset window we are about to open. We do this before we actually open the panel,
+ as doing it after causes it to stick from the last selection for some reason. */
+ if ([fDstFormatPopUp indexOfSelectedItem] == 0 && [fDstCodecsPopUp indexOfSelectedItem] == 1)
+ {
+ [fPresetNewX264Opt setEditable: YES];
+ [fPresetNewX264OptLabel setEnabled: YES];
+ }
+ else
+ {
+ [fPresetNewX264Opt setEditable: NO];
+ [fPresetNewX264OptLabel setEnabled: NO];
+ }
+ /* Erase info from the input fields */
+ [fPresetNewName setStringValue: @""];
+ [fPresetNewX264Opt setStringValue:@""];
+ /* Show the panel */
+ [NSApp beginSheet: fAddPresetPanel modalForWindow: fWindow
+ modalDelegate: NULL didEndSelector: NULL contextInfo: NULL];
+ [NSApp runModalForWindow: fAddPresetPanel];
+ [NSApp endSheet: fAddPresetPanel];
+ [fAddPresetPanel orderOut: self];
+
+
+}
+- (IBAction) CloseAddPresetPanel: (id) sender
+{
+ [NSApp stopModal];
+}
+
+
- (IBAction)AddUserPreset:(id)sender
{
+
/* Here we create a custom user preset */
[UserPresets addObject:[self CreatePreset]];
-
+ /* Erase info from the input fields */
+ [fPresetNewName setStringValue: @""];
+ [fPresetNewX264Opt setStringValue:@""];
/* We stop the modal window for the new preset */
[NSApp stopModal];
[self AddPreset];
@@ -1865,7 +1867,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:[fVidEncoderPopUp titleOfSelectedItem] forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:[fPresetNewX264Opt string] forKey:@"x264Option"];
+ [preset setObject:[fPresetNewX264Opt stringValue] forKey:@"x264Option"];
//[fDisplayX264Options setStringValue: [NSString stringWithFormat: @"Using Option: %@",CurUserPresetx264Opt]];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:[fVidQualityMatrix selectedRow]] forKey:@"VideoQualityType"];
diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib
index 74266e5de..bc5e6856c 100644
--- a/macosx/English.lproj/MainMenu.nib/classes.nib
+++ b/macosx/English.lproj/MainMenu.nib/classes.nib
@@ -88,7 +88,7 @@
fPresetDrawer = NSDrawer;
fPresetNewName = NSTextField;
fPresetNewPicSettingsApply = NSButton;
- fPresetNewX264Opt = NSTextView;
+ fPresetNewX264Opt = NSTextField;
fPresetNewX264OptLabel = NSTextField;
fPresetSaveButton = NSButton;
fPresetSelectedDisplay = NSTextField;
diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib
index 0ec631a81..91b113aeb 100644
--- a/macosx/English.lproj/MainMenu.nib/info.nib
+++ b/macosx/English.lproj/MainMenu.nib/info.nib
@@ -19,8 +19,8 @@
</array>
<key>IBOpenObjects</key>
<array>
- <integer>21</integer>
<integer>29</integer>
+ <integer>1867</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 14cc389e0..ef298fa5d 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ