summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <damiog@gmail.com>2017-12-11 13:14:23 +0100
committerDamiano Galassi <damiog@gmail.com>2017-12-11 13:14:23 +0100
commit05f181970d9c68c76ad9a686fee6f284412b5eb6 (patch)
treea3ccb5b6641cc06023253dedddc884dfc00f13e0 /macosx
parent601445a33e6237bab1491091641db5db1a4fd930 (diff)
MacGui: remove the audio preferences.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/English.lproj/Preferences.xib93
-rw-r--r--macosx/HBController.m46
-rw-r--r--macosx/HBPreferencesController.m26
3 files changed, 5 insertions, 160 deletions
diff --git a/macosx/English.lproj/Preferences.xib b/macosx/English.lproj/Preferences.xib
index 1bd5e131d..a4696659e 100644
--- a/macosx/English.lproj/Preferences.xib
+++ b/macosx/English.lproj/Preferences.xib
@@ -11,7 +11,6 @@
<connections>
<outlet property="builtInTokenField" destination="Tk3-Ig-fFI" id="DBp-1P-k9z"/>
<outlet property="fAdvancedView" destination="236" id="246"/>
- <outlet property="fAudioView" destination="235" id="247"/>
<outlet property="fGeneralView" destination="233" id="245"/>
<outlet property="fSendEncodeToAppField" destination="448" id="456"/>
<outlet property="formatTokenField" destination="6aa-GX-TuM" id="DyQ-f3-zBJ"/>
@@ -354,98 +353,6 @@
</constraints>
<point key="canvasLocation" x="487" y="-196"/>
</customView>
- <customView id="235" userLabel="Audio">
- <rect key="frame" x="0.0" y="0.0" width="500" height="139"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <customView translatesAutoresizingMaskIntoConstraints="NO" id="g8C-ES-TlL">
- <rect key="frame" x="51" y="0.0" width="398" height="139"/>
- <subviews>
- <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="mbd-FQ-sxW">
- <rect key="frame" x="132" y="20" width="248" height="46"/>
- <constraints>
- <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="46" id="JL9-J5-9Pf"/>
- </constraints>
- <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Note: these settings only apply to official presets. Custom presets may be configured using the Selection Behavior controls." id="fIj-Tz-ghb">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- </textField>
- <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="252">
- <rect key="frame" x="18" y="105" width="110" height="14"/>
- <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Native Language:" id="315">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- </textField>
- <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="509">
- <rect key="frame" x="18" y="74" width="110" height="14"/>
- <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Alternate Language:" id="510">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- </textFieldCell>
- </textField>
- <comboBox toolTip="Alternate Language. Secondary audio and subtitles language used when selecting an official preset." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="508">
- <rect key="frame" x="134" y="70" width="247" height="22"/>
- <comboBoxCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" numberOfVisibleItems="10" id="511">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
- </comboBoxCell>
- <connections>
- <accessibilityConnection property="title" destination="509" id="PE7-MG-1ib"/>
- <binding destination="-2" name="content" keyPath="self.languages.languagesArray" id="l02-3Q-yhI"/>
- <binding destination="61" name="value" keyPath="values.AlternateLanguage" previousBinding="l02-3Q-yhI" id="M5z-5g-aQN"/>
- </connections>
- </comboBox>
- <comboBox toolTip="Native Language. Primary audio and subtitles language used when selecting an official preset." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="253">
- <rect key="frame" x="134" y="101" width="247" height="22"/>
- <constraints>
- <constraint firstAttribute="width" constant="244" id="08J-n0-XqN"/>
- </constraints>
- <comboBoxCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" title="English" drawsBackground="YES" numberOfVisibleItems="10" id="316">
- <font key="font" metaFont="smallSystem"/>
- <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
- <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
- </comboBoxCell>
- <connections>
- <accessibilityConnection property="title" destination="252" id="hu3-YO-cRz"/>
- <binding destination="-2" name="content" keyPath="self.languages.languagesArray" id="xPC-Fg-O3G"/>
- <binding destination="61" name="value" keyPath="values.DefaultLanguage" previousBinding="xPC-Fg-O3G" id="I2t-Qy-TKa"/>
- </connections>
- </comboBox>
- </subviews>
- <constraints>
- <constraint firstItem="252" firstAttribute="leading" secondItem="g8C-ES-TlL" secondAttribute="leading" constant="20" id="1Uc-FP-Fz7"/>
- <constraint firstItem="253" firstAttribute="leading" secondItem="252" secondAttribute="trailing" constant="8" id="5RA-uv-hlp"/>
- <constraint firstItem="508" firstAttribute="width" secondItem="253" secondAttribute="width" id="743-TZ-SE8"/>
- <constraint firstAttribute="bottom" secondItem="mbd-FQ-sxW" secondAttribute="bottom" constant="20" symbolic="YES" id="9Yk-Dm-f6J"/>
- <constraint firstItem="252" firstAttribute="bottom" secondItem="253" secondAttribute="bottom" id="AKG-0f-pEd"/>
- <constraint firstItem="508" firstAttribute="bottom" secondItem="509" secondAttribute="bottom" id="CYq-h5-2hA"/>
- <constraint firstItem="508" firstAttribute="leading" secondItem="509" secondAttribute="trailing" constant="8" id="DzV-HN-HdL"/>
- <constraint firstItem="252" firstAttribute="top" secondItem="g8C-ES-TlL" secondAttribute="top" constant="20" id="G5G-gX-HD4"/>
- <constraint firstAttribute="trailing" secondItem="253" secondAttribute="trailing" constant="20" id="Gfv-U2-a1x"/>
- <constraint firstItem="509" firstAttribute="width" secondItem="252" secondAttribute="width" id="OQu-KV-dWA"/>
- <constraint firstItem="mbd-FQ-sxW" firstAttribute="trailing" secondItem="508" secondAttribute="trailing" id="a9V-NH-c0Z"/>
- <constraint firstItem="mbd-FQ-sxW" firstAttribute="top" secondItem="508" secondAttribute="bottom" constant="8" id="nap-cp-XiN"/>
- <constraint firstItem="509" firstAttribute="leading" secondItem="252" secondAttribute="leading" id="pLn-d3-d4N"/>
- <constraint firstItem="mbd-FQ-sxW" firstAttribute="leading" secondItem="508" secondAttribute="leading" id="u5s-Iu-ihl"/>
- <constraint firstItem="508" firstAttribute="top" secondItem="253" secondAttribute="bottom" constant="14" id="ydm-O7-1aR"/>
- </constraints>
- </customView>
- </subviews>
- <constraints>
- <constraint firstItem="g8C-ES-TlL" firstAttribute="top" secondItem="235" secondAttribute="top" id="Cjh-sZ-EAJ"/>
- <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="g8C-ES-TlL" secondAttribute="trailing" priority="750" id="Eqr-f4-h3f"/>
- <constraint firstItem="g8C-ES-TlL" firstAttribute="centerX" secondItem="235" secondAttribute="centerX" id="Gft-yL-QdT"/>
- <constraint firstItem="g8C-ES-TlL" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="235" secondAttribute="leading" priority="750" id="fmv-un-o26"/>
- <constraint firstAttribute="bottom" secondItem="g8C-ES-TlL" secondAttribute="bottom" id="ijo-kG-Cjj"/>
- </constraints>
- <point key="canvasLocation" x="507" y="-749"/>
- </customView>
<customView id="236" userLabel="Advanced">
<rect key="frame" x="0.0" y="0.0" width="500" height="292"/>
<autoresizingMask key="autoresizingMask"/>
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 96155900d..84ed25c75 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -149,14 +149,7 @@
fQueueController.controller = self;
presetManager = manager;
- if (manager.defaultPreset.isBuiltIn)
- {
- _currentPreset = [self presetByAddingDefaultLanguages:manager.defaultPreset];
- }
- else
- {
- _currentPreset = manager.defaultPreset;
- }
+ _currentPreset = manager.defaultPreset;
_scanSpecificTitleIdx = 1;
@@ -1378,43 +1371,6 @@
_currentPreset = currentPreset;
}
-
- if (!(self.undoManager.isUndoing || self.undoManager.isRedoing))
- {
- // If the preset is one of the built in, set some additional options
- if (_currentPreset.isBuiltIn)
- {
- _currentPreset = [self presetByAddingDefaultLanguages:_currentPreset];
- }
- }
-}
-
-- (HBPreset *)presetByAddingDefaultLanguages:(HBPreset *)preset
-{
- HBMutablePreset *mutablePreset = [preset mutableCopy];
- NSMutableArray<NSString *> *languages = [NSMutableArray array];
-
- if ([[NSUserDefaults standardUserDefaults] stringForKey:@"AlternateLanguage"])
- {
- NSString *lang = [HBUtilities isoCodeForNativeLang:[[NSUserDefaults standardUserDefaults] stringForKey:@"AlternateLanguage"]];
- if (lang)
- {
- [languages insertObject:lang atIndex:0];
- }
- }
-
- if ([[NSUserDefaults standardUserDefaults] stringForKey:@"DefaultLanguage"])
- {
- NSString *lang = [HBUtilities isoCodeForNativeLang:[[NSUserDefaults standardUserDefaults] stringForKey:@"DefaultLanguage"]];
- if (lang)
- {
- [languages insertObject:lang atIndex:0];
- }
- }
-
- mutablePreset[@"AudioLanguageList"] = languages;
-
- return mutablePreset;
}
- (void)setEdited:(BOOL)edited
diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m
index 30f69abe4..36ab70a31 100644
--- a/macosx/HBPreferencesController.m
+++ b/macosx/HBPreferencesController.m
@@ -4,10 +4,8 @@
*/
#import "HBPreferencesController.h"
-#import "HBLanguagesSelection.h"
#define TOOLBAR_GENERAL @"TOOLBAR_GENERAL"
-#define TOOLBAR_AUDIO @"TOOLBAR_AUDIO"
#define TOOLBAR_ADVANCED @"TOOLBAR_ADVANCED"
/**
@@ -23,7 +21,7 @@
@interface HBPreferencesController () <NSTokenFieldDelegate>
{
- IBOutlet NSView * fGeneralView, * fAudioView, * fAdvancedView;
+ IBOutlet NSView * fGeneralView, * fAdvancedView;
IBOutlet NSTextField * fSendEncodeToAppField;
}
@@ -40,8 +38,6 @@
@property (nonatomic, readonly, strong) NSArray *buildInFormatTokens;
@property (nonatomic, strong) NSArray *matches;
-@property (nonatomic, strong) HBLanguagesSelection *languages;
-
@end
@implementation HBPreferencesController
@@ -59,7 +55,6 @@
[[NSUserDefaults standardUserDefaults] registerDefaults:@{
@"HBShowOpenPanelAtLaunch": @YES,
- @"DefaultLanguage": @"English",
@"DefaultMpegExtension": @"Auto",
@"UseDvdNav": @"YES",
@"HBDefaultPresetsDrawerShow": @YES,
@@ -96,10 +91,7 @@
*/
- (instancetype)init
{
- if (self = [super initWithWindowNibName:@"Preferences"])
- {
- _languages = [[HBLanguagesSelection alloc] init];
- }
+ self = [super initWithWindowNibName:@"Preferences"];
return self;
}
@@ -151,12 +143,6 @@
label:NSLocalizedString(@"General", @"Preferences General Toolbar Item")
image:[NSImage imageNamed:@"settings"]];
}
- else if ( [ident isEqualToString:TOOLBAR_AUDIO] )
- {
- return [self toolbarItemWithIdentifier:ident
- label:NSLocalizedString(@"Audio", @"Preferences Audio Toolbar Item")
- image:[NSImage imageNamed:@"audio"]];
- }
else if ( [ident isEqualToString:TOOLBAR_ADVANCED] )
{
return [self toolbarItemWithIdentifier:ident
@@ -179,7 +165,7 @@
- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
{
- return @[TOOLBAR_GENERAL, TOOLBAR_AUDIO, TOOLBAR_ADVANCED];
+ return @[TOOLBAR_GENERAL, TOOLBAR_ADVANCED];
}
/* Manage the send encode to xxx.app windows and field */
@@ -291,11 +277,7 @@
if (sender)
{
NSString *identifier = [sender itemIdentifier];
- if ([identifier isEqualToString:TOOLBAR_AUDIO])
- {
- view = fAudioView;
- }
- else if([identifier isEqualToString:TOOLBAR_ADVANCED])
+ if([identifier isEqualToString:TOOLBAR_ADVANCED])
{
view = fAdvancedView;
}