From 26ffec037c1fe61c58f583590bc45cc2297c869b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 29 Nov 2003 19:48:41 +0000 Subject: [PATCH] Fix for language track selection on Windows. --- src/mmg/tab_input.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mmg/tab_input.cpp b/src/mmg/tab_input.cpp index c6de6720c..315176842 100644 --- a/src/mmg/tab_input.cpp +++ b/src/mmg/tab_input.cpp @@ -631,6 +631,8 @@ void tab_input::on_track_selected(wxCommandEvent &evt) { mmg_file_t *f; mmg_track_t *t; int new_sel; + uint32_t i; + wxString lang; if (selected_file == -1) return; @@ -647,7 +649,13 @@ void tab_input::on_track_selected(wxCommandEvent &evt) { else if (t->type == 's') subtitle_track_mode(*t->ctype); - cob_language->SetValue(*t->language); + lang = *t->language; + for (i = 0; i < sorted_iso_codes.Count(); i++) + if (extract_language_code(sorted_iso_codes[i]) == lang) { + lang = sorted_iso_codes[i]; + break; + } + cob_language->SetValue(lang); tc_track_name->SetValue(*t->track_name); cob_cues->SetValue(*t->cues); tc_delay->SetValue(*t->delay);