diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/text_panel.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 3c5abcefc..9e60b3f00 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -433,6 +433,7 @@ void TextPanel::setup_sensitivity () { int any_subs = 0; + /* we currently assume that FFmpeg subtitles are bitmapped */ int ffmpeg_subs = 0; ContentList sel = _parent->selected_text (); BOOST_FOREACH (shared_ptr<Content> i, sel) { @@ -467,6 +468,26 @@ TextPanel::setup_sensitivity () TextType const type = current_type (); + /* Set up _type */ + _type->Clear (); + _type->Append (_("open subtitles")); + if (ffmpeg_subs == 0) { + _type->Append (_("closed captions")); + } + + switch (type) { + case TEXT_OPEN_SUBTITLE: + _type->SetSelection (0); + break; + case TEXT_CLOSED_CAPTION: + if (_type->GetCount() > 1) { + _type->SetSelection (1); + } + break; + default: + break; + } + /* Set up sensitivity */ _use->Enable (!reference && any_subs > 0); bool const use = _use->GetValue (); |
