summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-23 15:10:11 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-23 15:10:11 +0100
commita5c629cb9b638b67a0e4c2d26fe9ab2e124bf0eb (patch)
tree6cd463704f413259516e2888704272a371a108a6 /src/wx
parentdf17bbd25da69fc38eb2dcd8b4a2531cf0bab0bc (diff)
Tidy up after mass rename.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/content_panel.cc40
-rw-r--r--src/wx/content_panel.h4
-rw-r--r--src/wx/dcp_panel.cc2
-rw-r--r--src/wx/film_viewer.cc2
-rw-r--r--src/wx/paste_dialog.cc12
-rw-r--r--src/wx/paste_dialog.h6
-rw-r--r--src/wx/player_information.cc2
-rw-r--r--src/wx/text_panel.cc122
-rw-r--r--src/wx/text_panel.h6
-rw-r--r--src/wx/text_view.cc6
-rw-r--r--src/wx/timeline.cc14
-rw-r--r--src/wx/timeline_labels_view.cc14
-rw-r--r--src/wx/timeline_labels_view.h4
-rw-r--r--src/wx/timing_panel.cc2
14 files changed, 118 insertions, 118 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index a6338ecfd..820372728 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -127,9 +127,9 @@ ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmVie
_panels.push_back (_video_panel);
_audio_panel = new AudioPanel (this);
_panels.push_back (_audio_panel);
- for (int i = 0; i < CAPTION_COUNT; ++i) {
- _caption_panel[i] = new TextPanel (this, static_cast<TextType>(i));
- _panels.push_back (_caption_panel[i]);
+ for (int i = 0; i < TEXT_COUNT; ++i) {
+ _text_panel[i] = new TextPanel (this, static_cast<TextType>(i));
+ _panels.push_back (_text_panel[i]);
}
_timing_panel = new TimingPanel (this, _film_viewer);
_panels.push_back (_timing_panel);
@@ -195,12 +195,12 @@ ContentPanel::selected_audio ()
}
ContentList
-ContentPanel::selected_caption ()
+ContentPanel::selected_text ()
{
ContentList sc;
BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
- if (!i->caption.empty()) {
+ if (!i->text.empty()) {
sc.push_back (i);
}
}
@@ -298,7 +298,7 @@ ContentPanel::selection_changed ()
bool have_video = false;
bool have_audio = false;
- bool have_caption[CAPTION_COUNT] = { false, false };
+ bool have_text[TEXT_COUNT] = { false, false };
BOOST_FOREACH (shared_ptr<Content> i, selected()) {
if (i->video) {
have_video = true;
@@ -306,23 +306,23 @@ ContentPanel::selection_changed ()
if (i->audio) {
have_audio = true;
}
- BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
- have_caption[j->original_type()] = true;
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+ have_text[j->original_type()] = true;
}
}
bool video_panel = false;
bool audio_panel = false;
- bool caption_panel[CAPTION_COUNT] = { false, false };
+ bool text_panel[TEXT_COUNT] = { false, false };
for (size_t i = 0; i < _notebook->GetPageCount(); ++i) {
if (_notebook->GetPage(i) == _video_panel) {
video_panel = true;
} else if (_notebook->GetPage(i) == _audio_panel) {
audio_panel = true;
}
- for (int j = 0; j < CAPTION_COUNT; ++j) {
- if (_notebook->GetPage(i) == _caption_panel[j]) {
- caption_panel[j] = true;
+ for (int j = 0; j < TEXT_COUNT; ++j) {
+ if (_notebook->GetPage(i) == _text_panel[j]) {
+ text_panel[j] = true;
}
}
}
@@ -355,16 +355,16 @@ ContentPanel::selection_changed ()
++off;
}
- for (int i = 0; i < CAPTION_COUNT; ++i) {
- if (have_caption[i] != caption_panel[i]) {
- if (caption_panel[i]) {
+ for (int i = 0; i < TEXT_COUNT; ++i) {
+ if (have_text[i] != text_panel[i]) {
+ if (text_panel[i]) {
_notebook->RemovePage (off);
}
- if (have_caption[i]) {
- _notebook->InsertPage (off, _caption_panel[i], _caption_panel[i]->name());
+ if (have_text[i]) {
+ _notebook->InsertPage (off, _text_panel[i], _text_panel[i]->name());
}
}
- if (have_caption[i]) {
+ if (have_text[i]) {
++off;
}
}
@@ -550,8 +550,8 @@ ContentPanel::setup_sensitivity ()
_video_panel->Enable (_generally_sensitive && video_selection.size() > 0);
_audio_panel->Enable (_generally_sensitive && audio_selection.size() > 0);
- for (int i = 0; i < CAPTION_COUNT; ++i) {
- _caption_panel[i]->Enable (_generally_sensitive && selection.size() == 1 && !selection.front()->caption.empty());
+ for (int i = 0; i < TEXT_COUNT; ++i) {
+ _text_panel[i]->Enable (_generally_sensitive && selection.size() == 1 && !selection.front()->text.empty());
}
_timing_panel->Enable (_generally_sensitive);
}
diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h
index d31375c8e..82cb2ed88 100644
--- a/src/wx/content_panel.h
+++ b/src/wx/content_panel.h
@@ -65,7 +65,7 @@ public:
ContentList selected ();
ContentList selected_video ();
ContentList selected_audio ();
- ContentList selected_caption ();
+ ContentList selected_text ();
FFmpegContentList selected_ffmpeg ();
void add_file_clicked ();
@@ -105,7 +105,7 @@ private:
wxButton* _timeline;
ContentSubPanel* _video_panel;
AudioPanel* _audio_panel;
- TextPanel* _caption_panel[CAPTION_COUNT];
+ TextPanel* _text_panel[TEXT_COUNT];
ContentSubPanel* _timing_panel;
std::list<ContentSubPanel *> _panels;
ContentMenu* _menu;
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index f1f82287d..5c4d3148d 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -438,7 +438,7 @@ DCPPanel::film_content_changed (int property)
property == VideoContentProperty::SCALE ||
property == DCPContentProperty::REFERENCE_VIDEO ||
property == DCPContentProperty::REFERENCE_AUDIO ||
- property == DCPContentProperty::REFERENCE_CAPTION) {
+ property == DCPContentProperty::REFERENCE_TEXT) {
setup_dcp_name ();
setup_sensitivity ();
}
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 651196d3c..ef28018e9 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -224,7 +224,7 @@ FilmViewer::set_film (shared_ptr<Film> film)
_closed_captions_dialog->set_player (_player);
- _player->set_always_burn_open_captions ();
+ _player->set_always_burn_open_subtitles ();
_player->set_play_referenced ();
_film->Changed.connect (boost::bind (&FilmViewer::film_changed, this, _1));
diff --git a/src/wx/paste_dialog.cc b/src/wx/paste_dialog.cc
index 07a3b156c..c613cad3b 100644
--- a/src/wx/paste_dialog.cc
+++ b/src/wx/paste_dialog.cc
@@ -20,7 +20,7 @@
#include "paste_dialog.h"
-PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool caption)
+PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool text)
: TableDialog (parent, _("Paste"), 1, 0, true)
{
_video = new wxCheckBox (this, wxID_ANY, _("Paste video settings"));
@@ -29,9 +29,9 @@ PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool caption
_audio = new wxCheckBox (this, wxID_ANY, _("Paste audio settings"));
_audio->Enable (audio);
add (_audio);
- _caption = new wxCheckBox (this, wxID_ANY, _("Paste caption settings"));
- _caption->Enable (caption);
- add (_caption);
+ _text = new wxCheckBox (this, wxID_ANY, _("Paste subtitle and caption settings"));
+ _text->Enable (text);
+ add (_text);
layout ();
}
@@ -49,7 +49,7 @@ PasteDialog::audio () const
}
bool
-PasteDialog::caption () const
+PasteDialog::text () const
{
- return _caption->GetValue ();
+ return _text->GetValue ();
}
diff --git a/src/wx/paste_dialog.h b/src/wx/paste_dialog.h
index 7de38fd2c..792195947 100644
--- a/src/wx/paste_dialog.h
+++ b/src/wx/paste_dialog.h
@@ -23,14 +23,14 @@
class PasteDialog : public TableDialog
{
public:
- PasteDialog (wxWindow* parent, bool video, bool audio, bool caption);
+ PasteDialog (wxWindow* parent, bool video, bool audio, bool text);
bool video () const;
bool audio () const;
- bool caption () const;
+ bool text () const;
private:
wxCheckBox* _video;
wxCheckBox* _audio;
- wxCheckBox* _caption;
+ wxCheckBox* _text;
};
diff --git a/src/wx/player_information.cc b/src/wx/player_information.cc
index c2bf77259..dbb394c64 100644
--- a/src/wx/player_information.cc
+++ b/src/wx/player_information.cc
@@ -131,7 +131,7 @@ PlayerInformation::triggered_update ()
if (dcp->audio && !dcp->audio->streams().empty()) {
checked_set (_dcp[r++], wxString::Format(_("Audio channels: %d"), dcp->audio->streams().front()->channels()));
}
- if (!dcp->caption.empty()) {
+ if (!dcp->text.empty()) {
checked_set (_dcp[r++], _("Subtitles: yes"));
} else {
checked_set (_dcp[r++], _("Subtitles: no"));
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc
index bc1183443..81ea9c941 100644
--- a/src/wx/text_panel.cc
+++ b/src/wx/text_panel.cc
@@ -45,8 +45,8 @@ using boost::shared_ptr;
using boost::dynamic_pointer_cast;
TextPanel::TextPanel (ContentPanel* p, TextType t)
- : ContentSubPanel (p, std_to_wx(caption_type_to_name(t)))
- , _caption_view (0)
+ : ContentSubPanel (p, std_to_wx(text_type_to_name(t)))
+ , _text_view (0)
, _fonts_dialog (0)
, _original_type (t)
{
@@ -73,7 +73,7 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
_use = new wxCheckBox (this, wxID_ANY, _("Use as"));
use->Add (_use, 0, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
_type = new wxChoice (this, wxID_ANY);
- _type->Append (_("subtitles (open captions)"));
+ _type->Append (_("open subtitles"));
_type->Append (_("closed captions"));
use->Add (_type, 1, wxEXPAND, 0);
grid->Add (use, wxGBPosition (r, 0), wxGBSpan (1, 2));
@@ -146,8 +146,8 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
{
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- _caption_view_button = new wxButton (this, wxID_ANY, _("View..."));
- s->Add (_caption_view_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
+ _text_view_button = new wxButton (this, wxID_ANY, _("View..."));
+ s->Add (_text_view_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
_fonts_dialog_button = new wxButton (this, wxID_ANY, _("Fonts..."));
s->Add (_fonts_dialog_button, 1, wxALL, DCPOMATIC_SIZER_GAP);
_appearance_dialog_button = new wxButton (this, wxID_ANY, _("Appearance..."));
@@ -165,7 +165,7 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
_reference->Bind (wxEVT_CHECKBOX, boost::bind (&TextPanel::reference_clicked, this));
_use->Bind (wxEVT_CHECKBOX, boost::bind (&TextPanel::use_toggled, this));
- _type->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::type_changed, this));
+ _type->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::type_changed, this));
_burn->Bind (wxEVT_CHECKBOX, boost::bind (&TextPanel::burn_toggled, this));
_x_offset->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::x_offset_changed, this));
_y_offset->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::y_offset_changed, this));
@@ -174,7 +174,7 @@ TextPanel::TextPanel (ContentPanel* p, TextType t)
_line_spacing->Bind (wxEVT_SPINCTRL, boost::bind (&TextPanel::line_spacing_changed, this));
_language->Bind (wxEVT_TEXT, boost::bind (&TextPanel::language_changed, this));
_stream->Bind (wxEVT_CHOICE, boost::bind (&TextPanel::stream_changed, this));
- _caption_view_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::caption_view_clicked, this));
+ _text_view_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::text_view_clicked, this));
_fonts_dialog_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::fonts_dialog_clicked, this));
_appearance_dialog_button->Bind (wxEVT_BUTTON, boost::bind (&TextPanel::appearance_dialog_clicked, this));
}
@@ -191,7 +191,7 @@ void
TextPanel::film_content_changed (int property)
{
FFmpegContentList fc = _parent->selected_ffmpeg ();
- ContentList sc = _parent->selected_caption ();
+ ContentList sc = _parent->selected_text ();
shared_ptr<FFmpegContent> fcs;
if (fc.size() == 1) {
@@ -203,9 +203,9 @@ TextPanel::film_content_changed (int property)
scs = sc.front ();
}
- shared_ptr<TextContent> caption;
+ shared_ptr<TextContent> text;
if (scs) {
- caption = scs->caption_of_original_type(_original_type);
+ text = scs->text_of_original_type(_original_type);
}
if (property == FFmpegContentProperty::SUBTITLE_STREAMS) {
@@ -224,15 +224,15 @@ TextPanel::film_content_changed (int property)
}
setup_sensitivity ();
} else if (property == TextContentProperty::USE) {
- checked_set (_use, caption ? caption->use() : false);
+ checked_set (_use, text ? text->use() : false);
setup_sensitivity ();
} else if (property == TextContentProperty::TYPE) {
- if (caption) {
- switch (caption->type()) {
- case CAPTION_OPEN:
+ if (text) {
+ switch (text->type()) {
+ case TEXT_OPEN_SUBTITLE:
_type->SetSelection (0);
break;
- case CAPTION_CLOSED:
+ case TEXT_CLOSED_CAPTION:
_type->SetSelection (1);
break;
default:
@@ -243,29 +243,29 @@ TextPanel::film_content_changed (int property)
}
setup_sensitivity ();
} else if (property == TextContentProperty::BURN) {
- checked_set (_burn, caption ? caption->burn() : false);
+ checked_set (_burn, text ? text->burn() : false);
} else if (property == TextContentProperty::X_OFFSET) {
- checked_set (_x_offset, caption ? lrint (caption->x_offset() * 100) : 0);
+ checked_set (_x_offset, text ? lrint (text->x_offset() * 100) : 0);
} else if (property == TextContentProperty::Y_OFFSET) {
- checked_set (_y_offset, caption ? lrint (caption->y_offset() * 100) : 0);
+ checked_set (_y_offset, text ? lrint (text->y_offset() * 100) : 0);
} else if (property == TextContentProperty::X_SCALE) {
- checked_set (_x_scale, caption ? lrint (caption->x_scale() * 100) : 100);
+ checked_set (_x_scale, text ? lrint (text->x_scale() * 100) : 100);
} else if (property == TextContentProperty::Y_SCALE) {
- checked_set (_y_scale, caption ? lrint (caption->y_scale() * 100) : 100);
+ checked_set (_y_scale, text ? lrint (text->y_scale() * 100) : 100);
} else if (property == TextContentProperty::LINE_SPACING) {
- checked_set (_line_spacing, caption ? lrint (caption->line_spacing() * 100) : 100);
+ checked_set (_line_spacing, text ? lrint (text->line_spacing() * 100) : 100);
} else if (property == TextContentProperty::LANGUAGE) {
- checked_set (_language, caption ? caption->language() : "");
- } else if (property == DCPContentProperty::REFERENCE_CAPTION) {
+ checked_set (_language, text ? text->language() : "");
+ } else if (property == DCPContentProperty::REFERENCE_TEXT) {
if (scs) {
shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (scs);
- checked_set (_reference, dcp ? dcp->reference_caption(_original_type) : false);
+ checked_set (_reference, dcp ? dcp->reference_text(_original_type) : false);
} else {
checked_set (_reference, false);
}
setup_sensitivity ();
- } else if (property == DCPContentProperty::CAPTIONS) {
+ } else if (property == DCPContentProperty::TEXTS) {
setup_sensitivity ();
}
}
@@ -273,21 +273,21 @@ TextPanel::film_content_changed (int property)
void
TextPanel::use_toggled ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption()) {
- i->caption_of_original_type(_original_type)->set_use (_use->GetValue());
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
+ i->text_of_original_type(_original_type)->set_use (_use->GetValue());
}
}
void
TextPanel::type_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption()) {
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
switch (_type->GetSelection()) {
case 0:
- i->caption_of_original_type(_original_type)->set_type (CAPTION_OPEN);
+ i->text_of_original_type(_original_type)->set_type (TEXT_OPEN_SUBTITLE);
break;
case 1:
- i->caption_of_original_type(_original_type)->set_type (CAPTION_CLOSED);
+ i->text_of_original_type(_original_type)->set_type (TEXT_CLOSED_CAPTION);
break;
}
}
@@ -296,8 +296,8 @@ TextPanel::type_changed ()
void
TextPanel::burn_toggled ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
- i->caption_of_original_type(_original_type)->set_burn (_burn->GetValue());
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ i->text_of_original_type(_original_type)->set_burn (_burn->GetValue());
}
}
@@ -306,7 +306,7 @@ TextPanel::setup_sensitivity ()
{
int any_subs = 0;
int ffmpeg_subs = 0;
- ContentList sel = _parent->selected_caption ();
+ ContentList sel = _parent->selected_text ();
BOOST_FOREACH (shared_ptr<Content> i, sel) {
/* These are the content types that could include subtitles */
shared_ptr<const FFmpegContent> fc = boost::dynamic_pointer_cast<const FFmpegContent> (i);
@@ -314,7 +314,7 @@ TextPanel::setup_sensitivity ()
shared_ptr<const DCPContent> dc = boost::dynamic_pointer_cast<const DCPContent> (i);
shared_ptr<const DCPSubtitleContent> dsc = boost::dynamic_pointer_cast<const DCPSubtitleContent> (i);
if (fc) {
- if (!fc->caption.empty()) {
+ if (!fc->text.empty()) {
++ffmpeg_subs;
++any_subs;
}
@@ -332,7 +332,7 @@ TextPanel::setup_sensitivity ()
}
string why_not;
- bool const can_reference = dcp && dcp->can_reference_caption (_original_type, why_not);
+ bool const can_reference = dcp && dcp->can_reference_text (_original_type, why_not);
setup_refer_button (_reference, _reference_note, dcp, can_reference, why_not);
bool const reference = _reference->GetValue ();
@@ -349,7 +349,7 @@ TextPanel::setup_sensitivity ()
_line_spacing->Enable (!reference && use);
_language->Enable (!reference && any_subs > 0 && use);
_stream->Enable (!reference && ffmpeg_subs == 1);
- _caption_view_button->Enable (!reference);
+ _text_view_button->Enable (!reference);
_fonts_dialog_button->Enable (!reference);
_appearance_dialog_button->Enable (!reference && any_subs > 0 && use);
}
@@ -379,49 +379,49 @@ TextPanel::stream_changed ()
void
TextPanel::x_offset_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
- i->caption_of_original_type(_original_type)->set_x_offset (_x_offset->GetValue() / 100.0);
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ i->text_of_original_type(_original_type)->set_x_offset (_x_offset->GetValue() / 100.0);
}
}
void
TextPanel::y_offset_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
- i->caption_of_original_type(_original_type)->set_y_offset (_y_offset->GetValue() / 100.0);
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ i->text_of_original_type(_original_type)->set_y_offset (_y_offset->GetValue() / 100.0);
}
}
void
TextPanel::x_scale_changed ()
{
- ContentList c = _parent->selected_caption ();
+ ContentList c = _parent->selected_text ();
if (c.size() == 1) {
- c.front()->caption_of_original_type(_original_type)->set_x_scale (_x_scale->GetValue() / 100.0);
+ c.front()->text_of_original_type(_original_type)->set_x_scale (_x_scale->GetValue() / 100.0);
}
}
void
TextPanel::y_scale_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
- i->caption_of_original_type(_original_type)->set_y_scale (_y_scale->GetValue() / 100.0);
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ i->text_of_original_type(_original_type)->set_y_scale (_y_scale->GetValue() / 100.0);
}
}
void
TextPanel::line_spacing_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
- i->caption_of_original_type(_original_type)->set_line_spacing (_line_spacing->GetValue() / 100.0);
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ i->text_of_original_type(_original_type)->set_line_spacing (_line_spacing->GetValue() / 100.0);
}
}
void
TextPanel::language_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_caption ()) {
- i->caption_of_original_type(_original_type)->set_language (wx_to_std (_language->GetValue()));
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ i->text_of_original_type(_original_type)->set_language (wx_to_std (_language->GetValue()));
}
}
@@ -439,25 +439,25 @@ TextPanel::content_selection_changed ()
film_content_changed (TextContentProperty::LANGUAGE);
film_content_changed (TextContentProperty::FONTS);
film_content_changed (TextContentProperty::TYPE);
- film_content_changed (DCPContentProperty::REFERENCE_CAPTION);
+ film_content_changed (DCPContentProperty::REFERENCE_TEXT);
}
void
-TextPanel::caption_view_clicked ()
+TextPanel::text_view_clicked ()
{
- if (_caption_view) {
- _caption_view->Destroy ();
- _caption_view = 0;
+ if (_text_view) {
+ _text_view->Destroy ();
+ _text_view = 0;
}
- ContentList c = _parent->selected_caption ();
+ ContentList c = _parent->selected_text ();
DCPOMATIC_ASSERT (c.size() == 1);
shared_ptr<Decoder> decoder = decoder_factory (c.front(), _parent->film()->log(), false);
if (decoder) {
- _caption_view = new TextView (this, _parent->film(), c.front(), c.front()->caption_of_original_type(_original_type), decoder, _parent->film_viewer());
- _caption_view->Show ();
+ _text_view = new TextView (this, _parent->film(), c.front(), c.front()->text_of_original_type(_original_type), decoder, _parent->film_viewer());
+ _text_view->Show ();
}
}
@@ -469,10 +469,10 @@ TextPanel::fonts_dialog_clicked ()
_fonts_dialog = 0;
}
- ContentList c = _parent->selected_caption ();
+ ContentList c = _parent->selected_text ();
DCPOMATIC_ASSERT (c.size() == 1);
- _fonts_dialog = new FontsDialog (this, c.front(), c.front()->caption_of_original_type(_original_type));
+ _fonts_dialog = new FontsDialog (this, c.front(), c.front()->text_of_original_type(_original_type));
_fonts_dialog->Show ();
}
@@ -489,16 +489,16 @@ TextPanel::reference_clicked ()
return;
}
- d->set_reference_caption (_original_type, _reference->GetValue ());
+ d->set_reference_text (_original_type, _reference->GetValue ());
}
void
TextPanel::appearance_dialog_clicked ()
{
- ContentList c = _parent->selected_caption ();
+ ContentList c = _parent->selected_text ();
DCPOMATIC_ASSERT (c.size() == 1);
- SubtitleAppearanceDialog* d = new SubtitleAppearanceDialog (this, c.front(), c.front()->caption_of_original_type(_original_type));
+ SubtitleAppearanceDialog* d = new SubtitleAppearanceDialog (this, c.front(), c.front()->text_of_original_type(_original_type));
if (d->ShowModal () == wxID_OK) {
d->apply ();
}
diff --git a/src/wx/text_panel.h b/src/wx/text_panel.h
index 70d46dacd..86381e6ff 100644
--- a/src/wx/text_panel.h
+++ b/src/wx/text_panel.h
@@ -45,7 +45,7 @@ private:
void line_spacing_changed ();
void language_changed ();
void stream_changed ();
- void caption_view_clicked ();
+ void text_view_clicked ();
void fonts_dialog_clicked ();
void reference_clicked ();
void appearance_dialog_clicked ();
@@ -64,8 +64,8 @@ private:
wxSpinCtrl* _line_spacing;
wxTextCtrl* _language;
wxChoice* _stream;
- wxButton* _caption_view_button;
- TextView* _caption_view;
+ wxButton* _text_view_button;
+ TextView* _text_view;
wxButton* _fonts_dialog_button;
FontsDialog* _fonts_dialog;
wxButton* _appearance_dialog_button;
diff --git a/src/wx/text_view.cc b/src/wx/text_view.cc
index 583632dd0..2106a3dec 100644
--- a/src/wx/text_view.cc
+++ b/src/wx/text_view.cc
@@ -35,7 +35,7 @@ using boost::shared_ptr;
using boost::bind;
using boost::dynamic_pointer_cast;
-TextView::TextView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> caption, shared_ptr<Decoder> decoder, FilmViewer* viewer)
+TextView::TextView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> text, shared_ptr<Decoder> decoder, FilmViewer* viewer)
: wxDialog (parent, wxID_ANY, _("Captions"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
, _content (content)
, _film_viewer (viewer)
@@ -87,8 +87,8 @@ TextView::TextView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content>
_frc = film->active_frame_rate_change (content->position());
/* Find the decoder that is being used for our TextContent and attach to it */
- BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->caption) {
- if (i->content() == caption) {
+ BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->text) {
+ if (i->content() == text) {
i->PlainStart.connect (bind (&TextView::data_start, this, _1));
i->Stop.connect (bind (&TextView::data_stop, this, _1));
}
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index b0a3a7247..dc0234376 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -228,7 +228,7 @@ Timeline::recreate_views ()
_views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i)));
}
- BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
_views.push_back (shared_ptr<TimelineView> (new TimelineTextContentView (*this, i, j)));
}
@@ -334,9 +334,9 @@ Timeline::assign_tracks ()
/* Tracks are:
Video (mono or left-eye)
Video (right-eye)
- Caption 1
- Caption 2
- Caption N
+ Text 1
+ Text 2
+ Text N
Atmos
Audio 1
Audio 2
@@ -373,9 +373,9 @@ Timeline::assign_tracks ()
_tracks = max (_tracks, 1);
- /* Captions */
+ /* Texts */
- int const caption_tracks = place<TimelineTextContentView> (_views, _tracks);
+ int const text_tracks = place<TimelineTextContentView> (_views, _tracks);
/* Atmos */
@@ -405,7 +405,7 @@ Timeline::assign_tracks ()
_labels_view->set_3d (have_3d);
_labels_view->set_audio_tracks (audio_tracks);
- _labels_view->set_caption_tracks (caption_tracks);
+ _labels_view->set_text_tracks (text_tracks);
_labels_view->set_atmos (have_atmos);
_time_axis_view->set_y (tracks());
diff --git a/src/wx/timeline_labels_view.cc b/src/wx/timeline_labels_view.cc
index af9cb771e..56228a7e7 100644
--- a/src/wx/timeline_labels_view.cc
+++ b/src/wx/timeline_labels_view.cc
@@ -32,13 +32,13 @@ TimelineLabelsView::TimelineLabelsView (Timeline& tl)
: TimelineView (tl)
, _threed (true)
, _audio_tracks (0)
- , _caption_tracks (0)
+ , _text_tracks (0)
, _atmos (true)
{
wxString labels[] = {
_("Video"),
_("Audio"),
- _("Captions"),
+ _("Subtitles/captions"),
_("Atmos")
};
@@ -70,9 +70,9 @@ TimelineLabelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >
gc->DrawText (_("Video"), 0, (ty + fy) / 2 - 8);
fy = ty;
- if (_caption_tracks) {
- ty = fy + _caption_tracks * h;
- gc->DrawText (_("Captions"), 0, (ty + fy) / 2 - 8);
+ if (_text_tracks) {
+ ty = fy + _text_tracks * h;
+ gc->DrawText (_("Subtitle/captions"), 0, (ty + fy) / 2 - 8);
fy = ty;
}
@@ -101,9 +101,9 @@ TimelineLabelsView::set_audio_tracks (int n)
}
void
-TimelineLabelsView::set_caption_tracks (int n)
+TimelineLabelsView::set_text_tracks (int n)
{
- _caption_tracks = n;
+ _text_tracks = n;
}
void
diff --git a/src/wx/timeline_labels_view.h b/src/wx/timeline_labels_view.h
index 646d93a58..f26c9762b 100644
--- a/src/wx/timeline_labels_view.h
+++ b/src/wx/timeline_labels_view.h
@@ -31,7 +31,7 @@ public:
void set_3d (bool s);
void set_audio_tracks (int n);
- void set_caption_tracks (int n);
+ void set_text_tracks (int n);
void set_atmos (bool s);
private:
@@ -40,6 +40,6 @@ private:
int _width;
bool _threed;
int _audio_tracks;
- int _caption_tracks;
+ int _text_tracks;
bool _atmos;
};
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index bf987e51e..e9fc51f58 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -282,7 +282,7 @@ TimingPanel::film_content_changed (int property)
++count_ac;
content = i;
}
- if (!i->caption.empty() && i->video_frame_rate()) {
+ if (!i->text.empty() && i->video_frame_rate()) {
++count_sc;
content = i;
}