GUI: preferences: honor "use ISO 639-3 languages" for all language lists

Fixes #3047.
This commit is contained in:
Moritz Bunkus 2021-03-03 12:53:33 +01:00
parent a486520943
commit 74d3bb7e09
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 9 additions and 7 deletions

View File

@ -23,6 +23,10 @@
happens when files are dragged & dropped onto the GUI. The same options are
available, but they're distinct settings, allowing for different use
cases. Fixes #3035.
* MKVToolNix GUI: preferences: the language lists for "deriving track
languages" and "enabling items by language" always included all the ISO
639-3 languages, even if those weren't enabled in the "often-used languages"
pane. Fixes #3047.
# Version 54.0.0 "F Maj Pixie" 2021-02-26

View File

@ -581,10 +581,14 @@ PreferencesDialog::setupJobRemovalPolicy() {
void
PreferencesDialog::setupCommonLanguages(bool withISO639_3) {
auto &allLanguages = withISO639_3 ? App::iso639Languages() : App::iso639_2Languages();
auto languageItems = QList<Util::SideBySideMultiSelect::Item>::fromVector(Util::stdVectorToQVector<Util::SideBySideMultiSelect::Item>(allLanguages));
ui->tbOftenUsedLanguages->setItems(QList<Util::SideBySideMultiSelect::Item>::fromVector(Util::stdVectorToQVector<Util::SideBySideMultiSelect::Item>(allLanguages)), m_cfg.m_oftenUsedLanguages);
ui->tbOftenUsedLanguages->setItems(languageItems, m_cfg.m_oftenUsedLanguages);
ui->cbOftenUsedLanguagesOnly->setChecked(m_cfg.m_oftenUsedLanguagesOnly && !m_cfg.m_oftenUsedLanguages.isEmpty());
enableOftendUsedLanguagesOnly();
ui->tbMEnableMuxingTracksByLanguage->setItems(languageItems, m_cfg.m_enableMuxingTracksByTheseLanguages);
ui->tbMDeriveTrackLanguageRecognizedLanguages->setItems(languageItems, m_cfg.m_recognizedTrackLanguagesInFileNames);
}
void
@ -694,9 +698,6 @@ PreferencesDialog::setupEnableMuxingTracksByLanguage() {
ui->cbMEnableMuxingAllVideoTracks->setChecked(m_cfg.m_enableMuxingAllVideoTracks);
ui->cbMEnableMuxingAllAudioTracks->setChecked(m_cfg.m_enableMuxingAllAudioTracks);
ui->cbMEnableMuxingAllSubtitleTracks->setChecked(m_cfg.m_enableMuxingAllSubtitleTracks);
auto &allLanguages = App::iso639Languages();
ui->tbMEnableMuxingTracksByLanguage->setItems(QList<Util::SideBySideMultiSelect::Item>::fromVector(Util::stdVectorToQVector<Util::SideBySideMultiSelect::Item>(allLanguages)), m_cfg.m_enableMuxingTracksByTheseLanguages);
}
void
@ -817,9 +818,6 @@ PreferencesDialog::setupDerivingTrackLanguagesFromFileName() {
setupComboBox(*ui->cbMDeriveSubtitleTrackLanguageFromFileName, m_cfg.m_deriveSubtitleTrackLanguageFromFileNamePolicy);
ui->leMDeriveTrackLanguageCustomRegex->setText(m_cfg.m_regexForDerivingTrackLanguagesFromFileNames);
ui->tbMDeriveTrackLanguageRecognizedLanguages->setItems(QList<Util::SideBySideMultiSelect::Item>::fromVector(Util::stdVectorToQVector<Util::SideBySideMultiSelect::Item>(App::iso639Languages())),
m_cfg.m_recognizedTrackLanguagesInFileNames);
}
void