diff options
author | Damiano Galassi <[email protected]> | 2016-12-14 15:15:36 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-12-14 15:15:36 +0100 |
commit | 14c2e61e3a4efe5ec508061b2e6bc702699662cb (patch) | |
tree | efdda1b40038f25b637008b0c10e6be0c205f603 /macosx/HBAudioDefaults.m | |
parent | f5a7f690c83fa18f3ca4d4f4f196f10db76c3480 (diff) |
MacGui: use the languages from the audio preferences for built-in presets, this had been broken when the MacGui started to use hb_preset_job_init().
Diffstat (limited to 'macosx/HBAudioDefaults.m')
-rw-r--r-- | macosx/HBAudioDefaults.m | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m index 43e8c858a..127e2a47a 100644 --- a/macosx/HBAudioDefaults.m +++ b/macosx/HBAudioDefaults.m @@ -172,22 +172,6 @@ return fallbacks; } -- (NSString *)isoCodeForNativeLang:(NSString *)language -{ - const iso639_lang_t *lang = lang_get_next(NULL); - for (lang = lang_get_next(lang); lang != NULL; lang = lang_get_next(lang)) - { - NSString *nativeLanguage = strlen(lang->native_name) ? @(lang->native_name) : @(lang->eng_name); - - if ([language isEqualToString:nativeLanguage]) - { - return @(lang->iso639_2); - } - } - - return nil; -} - #pragma mark - HBPresetCoding - (void)applyPreset:(HBPreset *)preset @@ -212,30 +196,6 @@ } self.trackSelectionLanguages = [NSMutableArray arrayWithArray:preset[@"AudioLanguageList"]]; - // If the preset is one of the built in, set some additional options - if ([preset[@"Type"] intValue] == 0) - { - if (self.trackSelectionLanguages.count == 0 || [self.trackSelectionLanguages.firstObject isEqualToString:@"und"]) - { - if ([[NSUserDefaults standardUserDefaults] stringForKey:@"AlternateLanguage"]) - { - NSString *lang = [self isoCodeForNativeLang:[[NSUserDefaults standardUserDefaults] stringForKey:@"AlternateLanguage"]]; - if (lang) - { - [self.trackSelectionLanguages insertObject:lang atIndex:0]; - } - } - if ([[NSUserDefaults standardUserDefaults] stringForKey:@"DefaultLanguage"]) - { - NSString *lang = [self isoCodeForNativeLang:[[NSUserDefaults standardUserDefaults] stringForKey:@"DefaultLanguage"]]; - if (lang) - { - [self.trackSelectionLanguages insertObject:lang atIndex:0]; - } - } - } - } - // Auto Passthru settings // first, disable all encoders self.allowAACPassthru = NO; |