Merge.
[dcpomatic.git] / src / wx / job_wrapper.cc
index 4c037ae284508f82feb4ac8cd091f412ae664189..cb02ecd0257dbddd771e80d131d2cc9f799d4a49 100644 (file)
 #include "job_wrapper.h"
 #include "wx_util.h"
 
-using namespace std;
+using boost::shared_ptr;
 
 void
-JobWrapper::make_dcp (wxWindow* parent, Film* film, bool transcode)
+JobWrapper::make_dcp (wxWindow* parent, shared_ptr<Film> film, bool transcode)
 {
        if (!film) {
                return;
@@ -35,16 +35,8 @@ JobWrapper::make_dcp (wxWindow* parent, Film* film, bool transcode)
        try {
                film->make_dcp (transcode);
        } catch (BadSettingError& e) {
-               stringstream s;
-               if (e.setting() == "dcp_long_name") {
-                       s << "Could not make DCP: long name is invalid (" << e.what() << ")";
-               } else {
-                       s << "Bad setting for " << e.setting() << "(" << e.what() << ")";
-               }
-               error_dialog (parent, s.str ());
+               error_dialog (parent, wxString::Format (_("Bad setting for %s (%s)"), e.setting().c_str(), e.what()));
        } catch (std::exception& e) {
-               stringstream s;
-               s << "Could not make DCP: " << e.what () << ".";
-               error_dialog (parent, s.str ());
+               error_dialog (parent, wxString::Format (_("Could not make DCP: %s"), e.what ()));
        }
 }