_set_video_frame_rate->Bind (wxEVT_BUTTON, bind(&ContentAdvancedDialog::set_video_frame_rate, this));
_video_frame_rate->Bind (wxEVT_TEXT, boost::bind(&ContentAdvancedDialog::video_frame_rate_changed, this));
_burnt_subtitle->Bind (wxEVT_CHECKBOX, boost::bind(&ContentAdvancedDialog::burnt_subtitle_changed, this));
- _burnt_subtitle_language->Changed.connect (boost::bind(&ContentAdvancedDialog::burnt_subtitle_language_changed, this));
setup_sensitivity ();
}
}
-void
-ContentAdvancedDialog::set_video_frame_rate ()
+optional<double>
+ContentAdvancedDialog::video_frame_rate() const
{
- if (_video_frame_rate->GetValue() != wxT("")) {
- _content->set_video_frame_rate (locale_convert<double>(wx_to_std(_video_frame_rate->GetValue())));
- } else {
- _content->unset_video_frame_rate ();
+ if (_video_frame_rate->GetValue() == wxT("")) {
+ return {};
}
+ return locale_convert<double>(wx_to_std(_video_frame_rate->GetValue()));
+}
+
+
+void
+ContentAdvancedDialog::set_video_frame_rate ()
+{
_set_video_frame_rate->Enable (false);
}
}
-void
-ContentAdvancedDialog::burnt_subtitle_language_changed ()
+optional<dcp::LanguageTag>
+ContentAdvancedDialog::burnt_subtitle_language() const
{
- DCPOMATIC_ASSERT (_content->video);
- _content->video->set_burnt_subtitle_language (_burnt_subtitle_language->get());
+ return _burnt_subtitle_language->get();
}