diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-06-01 11:28:48 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-06-01 14:25:17 +0200 |
| commit | ddd767fd647b2fd585d75ada000d3d01c4c43cb2 (patch) | |
| tree | a8807a0e60aac0cf39adee3a7a2d7c5c37cb94ad /src/wx/audio_panel.cc | |
| parent | 8a0ab373363c34daf5d926e951ee79fc422fdb3d (diff) | |
Put audio language back in the Film.
It feels neat to have audio language in the audio tab, to match
the subtitle language in the subtitle tab. It also avoids the potential
confusion of there being an audio language setting in the DCP metadata
but no subtitle language setting. However:
- I am yet to find a need to describe multiple audio languages in the
same DCP (all previous users of Film::audio_languages() were just taking
the first language off the list).
- As Carsten points out it's fiddly to have to set the audio language
for 5 separate-channel WAV files, for example (you wouldn't actually
have had to do this, but it would have felt like you did).
I think subtitle language remains neater where it is (per-content)
as there is this additional subtitle language metadata and it makes
much more sense (and is much more likely) that there are multiple
subtitle languages in a DCP than it does multiple audio languages.
Diffstat (limited to 'src/wx/audio_panel.cc')
| -rw-r--r-- | src/wx/audio_panel.cc | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc index ff710b1d1..a77922ed2 100644 --- a/src/wx/audio_panel.cc +++ b/src/wx/audio_panel.cc @@ -26,7 +26,6 @@ #include "content_panel.h" #include "dcpomatic_button.h" #include "gain_calculator_dialog.h" -#include "language_tag_widget.h" #include "static_text.h" #include "wx_util.h" #include "lib/config.h" @@ -95,9 +94,6 @@ AudioPanel::AudioPanel (ContentPanel* p) /// TRANSLATORS: this is an abbreviation for milliseconds, the unit of time _delay_ms_label = create_label (this, _("ms"), false); - _enable_language = new wxCheckBox (this, wxID_ANY, _("Language")); - _language = new LanguageTagWidget (this, _("Language used for the dialogue in this content"), boost::none); - _mapping = new AudioMappingView (this, _("Content"), _("content"), _("DCP"), _("DCP")); _sizer->Add (_mapping, 1, wxEXPAND | wxALL, 6); @@ -118,8 +114,6 @@ AudioPanel::AudioPanel (ContentPanel* p) _reference->Bind (wxEVT_CHECKBOX, boost::bind (&AudioPanel::reference_clicked, this)); _show->Bind (wxEVT_BUTTON, boost::bind (&AudioPanel::show_clicked, this)); _gain_calculate_button->Bind (wxEVT_BUTTON, boost::bind (&AudioPanel::gain_calculate_button_clicked, this)); - _enable_language->Bind (wxEVT_CHECKBOX, boost::bind (&AudioPanel::enable_language_clicked, this)); - _language->Changed.connect (boost::bind(&AudioPanel::language_changed, this)); _mapping_connection = _mapping->Changed.connect (boost::bind (&AudioPanel::mapping_changed, this, _1)); _active_jobs_connection = JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&AudioPanel::active_jobs_changed, this, _1, _2)); @@ -159,12 +153,6 @@ AudioPanel::add_to_grid () s->Add (_delay_ms_label, 0, wxALIGN_CENTER_VERTICAL); _grid->Add (s, wxGBPosition(r, 1)); ++r; - - s = new wxBoxSizer (wxHORIZONTAL); - s->Add (_enable_language, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, DCPOMATIC_SIZER_GAP); - s->Add (_language->sizer(), 1, wxALIGN_CENTER_VERTICAL | wxRIGHT); - _grid->Add (s, wxGBPosition(r, 0), wxGBSpan(1, 2), wxEXPAND); - ++r; } AudioPanel::~AudioPanel () @@ -244,14 +232,6 @@ AudioPanel::film_content_changed (int property) setup_sensitivity (); } else if (property == ContentProperty::VIDEO_FRAME_RATE) { setup_description (); - } else if (property == AudioContentProperty::LANGUAGE) { - if (ac.size() == 1 && ac.front()->audio->language()) { - _enable_language->SetValue (true); - _language->set (ac.front()->audio->language()); - } else { - _enable_language->SetValue (false); - _language->set (boost::none); - } } } @@ -317,7 +297,6 @@ AudioPanel::content_selection_changed () film_content_changed (AudioContentProperty::STREAMS); film_content_changed (AudioContentProperty::GAIN); - film_content_changed (AudioContentProperty::LANGUAGE); film_content_changed (DCPContentProperty::REFERENCE_AUDIO); setup_sensitivity (); @@ -353,8 +332,6 @@ AudioPanel::setup_sensitivity () _delay->wrapped()->Enable (!ref); _mapping->Enable (!ref && single); _description->Enable (!ref && single); - _enable_language->Enable (!ref && single); - _language->enable (!ref && single && _enable_language->GetValue()); } void @@ -460,24 +437,3 @@ AudioPanel::set_film (shared_ptr<Film>) } } - -void -AudioPanel::enable_language_clicked () -{ - setup_sensitivity (); - auto sel = _parent->selected_audio (); - if (sel.size() == 1) { - sel.front()->audio->set_language (_enable_language->GetValue() ? _language->get() : boost::none); - } -} - - -void -AudioPanel::language_changed () -{ - auto sel = _parent->selected_audio (); - if (sel.size() == 1) { - sel.front()->audio->set_language (_language->get()); - } -} - |
