diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.h | 2 | ||||
-rw-r--r-- | macosx/Controller.mm | 54 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/classes.nib | 2 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/info.nib | 8 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/keyedobjects.nib | bin | 96832 -> 97382 bytes |
5 files changed, 44 insertions, 22 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h index ea35ac295..9d6969466 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -195,7 +195,7 @@ - (IBAction) OpenForums: (id) sender; // Preset Methods Here - +- (IBAction) CustomSettingUsed: (id) sender; - (IBAction) ShowAddPresetPanel: (id) sender; - (IBAction) CloseAddPresetPanel: (id) sender; - (NSDictionary *)CreatePreset; diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 717303ebf..71d065462 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -433,8 +433,9 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow } // Select the longuest title [fSrcTitlePopUp selectItemAtIndex: indxpri]; - - + /* We set the Settings Display to "Default" here + until we get default presets implemented */ + [fPresetSelectedDisplay setStringValue: @"Default"]; [self TitlePopUpChanged: NULL]; [self EnableUI: YES]; @@ -656,6 +657,7 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow [self QualitySliderChanged: sender]; [self CalculateBitrate: sender]; + [self CustomSettingUsed: sender]; } - (IBAction) QualitySliderChanged: (id) sender @@ -663,6 +665,7 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow [fVidConstantCell setTitle: [NSString stringWithFormat: _( @"Constant quality: %.0f %%" ), 100.0 * [fVidQualitySlider floatValue]]]; + [self CustomSettingUsed: sender]; } - (IBAction) BrowseFile: (id) sender @@ -1231,7 +1234,9 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow /* changing the codecs on offer may mean that we are/aren't now offering AAC, so */ /* check if this change means we should / should't offer 6-channel AAC extraction */ [self Check6ChannelAACExtraction: sender]; - + /* We call method method to change UI to reflect whether a preset is used or not*/ + [self CustomSettingUsed: sender]; + } - (IBAction) CodecsPopUpChanged: (id) sender @@ -1274,7 +1279,8 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow [self Check6ChannelAACExtraction: sender]; [self CalculateBitrate: sender]; - + /* We call method method to change UI to reflect whether a preset is used or not*/ + [self CustomSettingUsed: sender]; } - (IBAction) EncoderPopUpChanged: (id) sender @@ -1303,8 +1309,9 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow } - [self CalculatePictureSizing: sender]; - + [self CalculatePictureSizing: sender]; + /* We call method method to change UI to reflect whether a preset is used or not*/ + [self CustomSettingUsed: sender]; } - (IBAction) Check6ChannelAACExtraction: (id) sender @@ -1473,8 +1480,25 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow [fVidBitrateField setIntValue: hb_calc_bitrate( job, [fVidTargetSizeField intValue] )]; + + +} + +/* Method to determine if we should change the UI +To reflect whether or not a Preset is being used or if +the user is using "Custom" settings by determining the sender*/ +- (IBAction) CustomSettingUsed: (id) sender +{ + if ([sender stringValue] != NULL) + { + /* Deselect the currently selected Preset if there is one*/ + [tableView deselectRow:[tableView selectedRow]]; + /* Change UI to show "Custom" settings are being used */ + [fPresetSelectedDisplay setStringValue: @"Custom"]; + } } + - (IBAction) ShowAddPresetPanel: (id) sender { /* Show the panel */ @@ -1773,7 +1797,7 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow /* we get the chosen preset from the UserPresets array */ chosenPreset = [UserPresets objectAtIndex:[sender selectedRow]]; /* we set the preset display field in main window here */ - //[fPresetSelectedDisplay setStringValue: [NSString stringWithFormat: @"%@", [chosenPreset valueForKey:@"PresetName"]]]; + [fPresetSelectedDisplay setStringValue: [NSString stringWithFormat: @"%@", [chosenPreset valueForKey:@"PresetName"]]]; /* File Format */ [fDstFormatPopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"FileFormat"]]]; [self FormatPopUpChanged: NULL]; @@ -1785,9 +1809,9 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow /* Video encoder */ [fVidEncoderPopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"VideoEncoder"]]]; /* Lets run through the following functions to get variables set there */ - [self EncoderPopUpChanged: sender]; - [self Check6ChannelAACExtraction: sender]; - [self CalculateBitrate: sender]; + [self EncoderPopUpChanged: NULL]; + [self Check6ChannelAACExtraction: NULL]; + [self CalculateBitrate: NULL]; /* Video quality */ [fVidQualityMatrix selectCellAtRow:[[chosenPreset objectForKey:@"VideoQualityType"] intValue] column:0]; @@ -1796,7 +1820,7 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow [fVidBitrateField setStringValue: [NSString stringWithFormat:[chosenPreset valueForKey:@"VideoAvgBitrate"]]]; [fVidQualitySlider setFloatValue: [[chosenPreset valueForKey:@"VideoQualitySlider"] floatValue]]; - [self VideoMatrixChanged: sender]; + [self VideoMatrixChanged: NULL]; /* Video framerate */ [fVidRatePopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"VideoFramerate"]]]; @@ -1813,7 +1837,7 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow [fAudLang1PopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"AudioLang1"]]]; /* Audio Language One Surround Sound Checkbox*/ [fAudLang1SurroundCheck setState:[[chosenPreset objectForKey:@"AudioLang1Surround"] intValue]]; - [self Check6ChannelAACExtraction: sender]; + [self Check6ChannelAACExtraction: NULL]; /* Audio Sample Rate*/ [fAudRatePopUp selectItemWithTitle: [NSString stringWithFormat:[chosenPreset valueForKey:@"AudioSampleRate"]]]; /* Audio Bitrate Rate*/ @@ -1838,11 +1862,9 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultPresetsDrawerShow job->crop[1] = [[chosenPreset objectForKey:@"PictureBottomCrop"] intValue]; job->crop[2] = [[chosenPreset objectForKey:@"PictureLeftCrop"] intValue]; job->crop[3] = [[chosenPreset objectForKey:@"PictureRightCrop"] intValue]; - [self CalculatePictureSizing: sender]; + [self CalculatePictureSizing: NULL]; } - - // Deselect the currently selected table // - //[tableView deselectRow:[tableView selectedRow]]; + } } diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib index fb50aa48f..28e806f96 100644 --- a/macosx/English.lproj/MainMenu.nib/classes.nib +++ b/macosx/English.lproj/MainMenu.nib/classes.nib @@ -12,6 +12,7 @@ ChapterPopUpChanged = id; CloseAddPresetPanel = id; CodecsPopUpChanged = id; + CustomSettingUsed = id; DeletePreset = id; EnableQueue = id; EncoderPopUpChanged = id; @@ -29,7 +30,6 @@ ShowScanPanel = id; TitlePopUpChanged = id; VideoMatrixChanged = id; - myAction = id; tableViewSelected = id; }; CLASS = HBController; diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index f4bcaea33..079775a97 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -3,11 +3,11 @@ <plist version="1.0"> <dict> <key>IBDocumentLocation</key> - <string>-6 259 630 601 0 0 1440 878 </string> + <string>-2 228 630 601 0 0 1440 878 </string> <key>IBEditorPositions</key> <dict> <key>1843</key> - <string>610 276 220 592 0 0 1440 878 </string> + <string>1970 386 220 592 1440 0 1280 1024 </string> <key>29</key> <string>102 834 300 44 0 0 1440 878 </string> </dict> @@ -19,8 +19,8 @@ </array> <key>IBOpenObjects</key> <array> - <integer>1438</integer> - <integer>1843</integer> + <integer>21</integer> + <integer>29</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 Binary files differindex f5251873d..0b02921b3 100644 --- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib +++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib |