Note that newer libsub version is required.
[dcpomatic.git] / src / wx / subtitle_appearance_dialog.cc
index b5ab8c2db79777f9ab8bee2230782917c104442d..d88f747259a5c657787c5fa4123d85893359b5d0 100644 (file)
 #include "lib/ffmpeg_content.h"
 #include "lib/examine_ffmpeg_subtitles_job.h"
 #include "lib/job_manager.h"
-#include "lib/warnings.h"
-DCPOMATIC_DISABLE_WARNINGS
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/wx.h>
 #include <wx/clrpicker.h>
 #include <wx/spinctrl.h>
 #include <wx/gbsizer.h>
-DCPOMATIC_ENABLE_WARNINGS
+LIBDCP_ENABLE_WARNINGS
 
 
+using std::dynamic_pointer_cast;
 using std::map;
-using std::string;
+using std::make_shared;
 using std::shared_ptr;
+using std::string;
 using boost::bind;
-using std::dynamic_pointer_cast;
 using boost::optional;
 using namespace dcpomatic;
 #if BOOST_VERSION >= 106100
@@ -68,7 +69,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr
                /* XXX: assuming that all FFmpeg streams have bitmap subs */
                if (_stream->colours().empty()) {
                        _job_manager_connection = JobManager::instance()->ActiveJobsChanged.connect(boost::bind(&SubtitleAppearanceDialog::active_jobs_changed, this, _1));
-                       _job = JobManager::instance()->add(shared_ptr<Job>(new ExamineFFmpegSubtitlesJob(film, ff)));
+                       _job = JobManager::instance()->add(make_shared<ExamineFFmpegSubtitlesJob>(film, ff));
                }
        }
 
@@ -203,11 +204,11 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr
 
        _outline_width->SetValue (_text->outline_width ());
 
-       _force_colour->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
-       _force_effect_colour->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
-       _force_effect->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
-       _force_fade_in->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
-       _force_fade_out->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
+       _force_colour->bind(&SubtitleAppearanceDialog::setup_sensitivity, this);
+       _force_effect_colour->bind(&SubtitleAppearanceDialog::setup_sensitivity, this);
+       _force_effect->bind(&SubtitleAppearanceDialog::setup_sensitivity, this);
+       _force_fade_in->bind(&SubtitleAppearanceDialog::setup_sensitivity, this);
+       _force_fade_out->bind(&SubtitleAppearanceDialog::setup_sensitivity, this);
        _effect->Bind (wxEVT_CHOICE, bind (&SubtitleAppearanceDialog::setup_sensitivity, this));
        _content_connection = _content->Change.connect (bind (&SubtitleAppearanceDialog::content_change, this, _1));
 
@@ -222,7 +223,7 @@ SubtitleAppearanceDialog::content_change (ChangeType type)
        }
 }
 
-wxCheckBox*
+CheckBox*
 SubtitleAppearanceDialog::set_to (wxWindow* w, int& r)
 {
        auto s = new wxBoxSizer (wxHORIZONTAL);