X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_batch.cc;h=9cb6ddc5546fc3887a598641e9bfc5c0d3ddd996;hb=8e1b0dfe3103867a749ff51156e3ed6547f298a0;hp=9488f728c873d4ff8830211b78e24c31681f30e8;hpb=7dd6bd52b76c1647144f8a11254bc7b722797b66;p=dcpomatic.git diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 9488f728c..9cb6ddc55 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -40,18 +40,21 @@ #include #include #include -#include #include +#include using std::exception; using std::string; using std::cout; using std::list; using std::set; -using boost::shared_ptr; +using std::shared_ptr; using boost::thread; using boost::scoped_array; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif static list films_to_load; @@ -175,13 +178,13 @@ public: set > films; - BOOST_FOREACH (shared_ptr i, JobManager::instance()->get()) { + for (auto i: JobManager::instance()->get()) { films.insert (i->film()); } - BOOST_FOREACH (shared_ptr i, films) { + for (auto i: films) { double progress = 0; - BOOST_FOREACH (shared_ptr j, JobManager::instance()->get()) { + for (auto j: JobManager::instance()->get()) { if (i == j->film() && dynamic_pointer_cast(j)) { progress = j->progress().get_value_or(0); } @@ -196,8 +199,8 @@ public: if (!confirm_dialog ( this, wxString::Format( - _("The DCPs for this film and the films already in the queue will take up about %.1f Gb. The " - "disks that you are using only have %.1f Gb available. Do you want to add this film to the queue anyway?"), + _("The DCPs for this film and the films already in the queue will take up about %.1f GB. The " + "disks that you are using only have %.1f GB available. Do you want to add this film to the queue anyway?"), total_required, available))) { return; } @@ -381,6 +384,8 @@ class App : public wxApp { bool OnInit () { + wxInitAllImageHandlers (); + SetAppName (_("DCP-o-matic Batch Converter")); is_batch_converter = true; @@ -432,7 +437,7 @@ class App : public wxApp this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this)); shared_ptr film; - BOOST_FOREACH (boost::filesystem::path i, films_to_load) { + for (auto i: films_to_load) { if (boost::filesystem::is_directory (i)) { try { film.reset (new Film (i));