+ film_content_changed (SubtitleContentProperty::SUBTITLE_X_SCALE);
+ film_content_changed (SubtitleContentProperty::SUBTITLE_Y_SCALE);
+ film_content_changed (SubtitleContentProperty::SUBTITLE_LANGUAGE);
+ film_content_changed (SubtitleContentProperty::FONTS);
+}
+
+void
+SubtitlePanel::subtitle_view_clicked ()
+{
+ if (_subtitle_view) {
+ _subtitle_view->Destroy ();
+ _subtitle_view = 0;
+ }
+
+ SubtitleContentList c = _parent->selected_subtitle ();
+ 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 ();
+ }
+}
+
+void
+SubtitlePanel::fonts_dialog_clicked ()
+{
+ if (_fonts_dialog) {
+ _fonts_dialog->Destroy ();
+ _fonts_dialog = 0;
+ }
+
+ SubtitleContentList c = _parent->selected_subtitle ();
+ DCPOMATIC_ASSERT (c.size() == 1);
+
+ _fonts_dialog = new FontsDialog (this, c.front ());
+ _fonts_dialog->Show ();