projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a4bfdce
)
Don't offer to make closed captions from subs in FFmpeg files (related to #1393).
author
Carl Hetherington
<cth@carlh.net>
Fri, 8 Feb 2019 21:59:31 +0000
(21:59 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 8 Feb 2019 21:59:31 +0000
(21:59 +0000)
src/wx/text_panel.cc
patch
|
blob
|
history
diff --git
a/src/wx/text_panel.cc
b/src/wx/text_panel.cc
index 3c5abcefc2453d723c6cb4baf4f92a30eea2881f..9e60b3f00ea4f6cd42a1aba81d265beb0bb9c5ca 100644
(file)
--- a/
src/wx/text_panel.cc
+++ b/
src/wx/text_panel.cc
@@
-433,6
+433,7
@@
void
TextPanel::setup_sensitivity ()
{
int any_subs = 0;
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) {
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 ();
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 ();
/* Set up sensitivity */
_use->Enable (!reference && any_subs > 0);
bool const use = _use->GetValue ();