summaryrefslogtreecommitdiff
path: root/src/wx/subtitle_panel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/subtitle_panel.cc')
-rw-r--r--src/wx/subtitle_panel.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/wx/subtitle_panel.cc b/src/wx/subtitle_panel.cc
index 1e137f233..9823df7a7 100644
--- a/src/wx/subtitle_panel.cc
+++ b/src/wx/subtitle_panel.cc
@@ -67,7 +67,7 @@ SubtitlePanel::SubtitlePanel (ContentPanel* p)
add_label_to_sizer (s, this, _("%"), false);
grid->Add (s);
}
-
+
{
add_label_to_sizer (grid, this, _("X Scale"), true);
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
@@ -89,7 +89,7 @@ SubtitlePanel::SubtitlePanel (ContentPanel* p)
add_label_to_sizer (grid, this, _("Language"), true);
_language = new wxTextCtrl (this, wxID_ANY);
grid->Add (_language, 1, wxEXPAND);
-
+
add_label_to_sizer (grid, this, _("Stream"), true);
_stream = new wxChoice (this, wxID_ANY);
grid->Add (_stream, 1, wxEXPAND);
@@ -101,7 +101,7 @@ SubtitlePanel::SubtitlePanel (ContentPanel* p)
_fonts_dialog_button = new wxButton (this, wxID_ANY, _("Fonts..."));
grid->Add (_fonts_dialog_button);
grid->AddSpacer (0);
-
+
_x_offset->SetRange (-100, 100);
_y_offset->SetRange (-100, 100);
_x_scale->SetRange (10, 1000);
@@ -149,7 +149,7 @@ SubtitlePanel::film_content_changed (int property)
for (vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = s.begin(); i != s.end(); ++i) {
_stream->Append (std_to_wx ((*i)->name), new wxStringClientData (std_to_wx ((*i)->identifier ())));
}
-
+
if (fcs->subtitle_stream()) {
checked_set (_stream, fcs->subtitle_stream()->identifier ());
} else {
@@ -205,10 +205,10 @@ SubtitlePanel::setup_sensitivity ()
++any_subs;
}
}
-
+
_use->Enable (any_subs > 0);
bool const use = _use->GetValue ();
-
+
_x_offset->Enable (any_subs > 0 && use);
_y_offset->Enable (any_subs > 0 && use);
_x_scale->Enable (any_subs > 0 && use);
@@ -228,7 +228,7 @@ SubtitlePanel::stream_changed ()
}
shared_ptr<FFmpegContent> fcs = fc.front ();
-
+
vector<shared_ptr<FFmpegSubtitleStream> > a = fcs->subtitle_streams ();
vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = a.begin ();
string const s = string_client_data (_stream->GetClientObject (_stream->GetSelection ()));
@@ -311,17 +311,17 @@ SubtitlePanel::subtitle_view_clicked ()
DCPOMATIC_ASSERT (c.size() == 1);
shared_ptr<SubtitleDecoder> decoder;
-
+
shared_ptr<SubRipContent> sr = dynamic_pointer_cast<SubRipContent> (c.front ());
if (sr) {
decoder.reset (new SubRipDecoder (sr));
}
-
+
shared_ptr<DCPSubtitleContent> dc = dynamic_pointer_cast<DCPSubtitleContent> (c.front ());
if (dc) {
decoder.reset (new DCPSubtitleDecoder (dc));
}
-
+
if (decoder) {
_subtitle_view = new SubtitleView (this, _parent->film(), decoder, c.front()->position ());
_subtitle_view->Show ();