X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline_dialog.cc;h=f15bf7bfc254f712d37968ce280f2b97f916edb5;hb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;hp=80686dc1749b552431d038a19866f9880574b56a;hpb=43b5ff1d2dc872f9029a7e59a85af59dbad8536f;p=dcpomatic.git diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc index 80686dc17..f15bf7bfc 100644 --- a/src/wx/timeline_dialog.cc +++ b/src/wx/timeline_dialog.cc @@ -32,8 +32,11 @@ using std::list; using std::cout; using std::string; -using boost::shared_ptr; -using boost::weak_ptr; +using std::shared_ptr; +using std::weak_ptr; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr film, weak_ptr viewer) : wxDialog ( @@ -54,7 +57,7 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr film, weak_pt , _film (film) , _timeline (this, cp, film, viewer) { - wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL); + auto sizer = new wxBoxSizer (wxVERTICAL); wxBitmap select (bitmap_path("select"), wxBITMAP_TYPE_PNG); wxBitmap zoom (bitmap_path("zoom"), wxBITMAP_TYPE_PNG); @@ -88,26 +91,19 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr film, weak_pt sizer->SetSizeHints (this); _toolbar->ToggleTool ((int) Timeline::SNAP, _timeline.snap ()); - film_change (CHANGE_TYPE_DONE, Film::SEQUENCE); + film_change (ChangeType::DONE, Film::SEQUENCE); _film_changed_connection = film->Change.connect (bind (&TimelineDialog::film_change, this, _1, _2)); } -wxString -TimelineDialog::bitmap_path (string name) -{ - boost::filesystem::path p = shared_path() / String::compose("%1.png", name); - return std_to_wx (p.string()); -} - void TimelineDialog::film_change (ChangeType type, Film::Property p) { - if (type != CHANGE_TYPE_DONE) { + if (type != ChangeType::DONE) { return; } - shared_ptr film = _film.lock (); + auto film = _film.lock (); if (!film) { return; } @@ -131,7 +127,7 @@ TimelineDialog::tool_clicked (wxCommandEvent& ev) if (t == Timeline::SNAP) { _timeline.set_snap (_toolbar->GetToolState ((int) t)); } else if (t == Timeline::SEQUENCE) { - shared_ptr film = _film.lock (); + auto film = _film.lock (); if (film) { film->set_sequence (_toolbar->GetToolState ((int) t)); }