Try a bit of backwards compatibility in state file.
[dcpomatic.git] / src / wx / job_wrapper.cc
index be214b0ac7c6a99184a596f18e419315463778f2..f2056cf498abacd429c92464d9176082e3e7c5c0 100644 (file)
 #include "lib/film.h"
 #include "lib/exceptions.h"
 #include "job_wrapper.h"
-#include "gtk_util.h"
+#include "wx_util.h"
 
-using namespace std;
+using boost::shared_ptr;
 
 void
-JobWrapper::make_dcp (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 (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 (s.str ());
+               error_dialog (parent, String::compose ("Bad setting for %1 (%2)", e.setting(), e.what ()));
        } catch (std::exception& e) {
-               stringstream s;
-               s << "Could not make DCP: " << e.what () << ".";
-               error_dialog (s.str ());
+               error_dialog (parent, String::compose ("Could not make DCP: %1", e.what ()));
        }
 }