Merge.
[dcpomatic.git] / src / tools / dvdomatic.cc
index 9d0d586628ace4edd7317acfc5abc16cf200814c..0565d3a1c871aadf4177bb919f14e7bf4a0631a1 100644 (file)
@@ -64,7 +64,7 @@ public:
        {
                stringstream s;
                s << "Save changes to film \"" << film->name() << "\" before closing?";
-               _dialog = new wxMessageDialog (0, std_to_wx (s.str()), wxT ("Film changed"), wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION);
+               _dialog = new wxMessageDialog (0, std_to_wx (s.str()), _("Film changed"), wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION);
        }
 
        ~FilmChangedDialog ()
@@ -263,18 +263,14 @@ public:
                if (r == wxID_OK) {
 
                        if (boost::filesystem::exists (d->get_path())) {
-                               error_dialog (this, String::compose ("The directory %1 already exists.", d->get_path()));
+                               error_dialog (this, wxString::Format (_("The directory %s already exists"), d->get_path().c_str()));
                                return;
                        }
                        
                        maybe_save_then_delete_film ();
                        film.reset (new Film (d->get_path (), false));
                        film->log()->set_level (log_level);
-#if BOOST_FILESYSTEM_VERSION == 3              
                        film->set_name (boost::filesystem::path (d->get_path()).filename().generic_string());
-#else          
-                       film->set_name (boost::filesystem::path (d->get_path()).filename());
-#endif
                        set_film ();
                }
                
@@ -283,7 +279,7 @@ public:
 
        void file_open (wxCommandEvent &)
        {
-               wxDirDialog* c = new wxDirDialog (this, wxT ("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
+               wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST);
                int const r = c->ShowModal ();
                
                if (r == wxID_OK) {
@@ -293,7 +289,9 @@ public:
                                film->log()->set_level (log_level);
                                set_film ();
                        } catch (std::exception& e) {
-                               error_dialog (this, String::compose ("Could not open film at %1 (%2)", wx_to_std (c->GetPath()), e.what()));
+                               wxString p = c->GetPath ();
+                               wxCharBuffer b = p.ToUTF8 ();
+                               error_dialog (this, wxString::Format (_("Could not open film at %s (%s)"), p.data(), e.what()));
                        }
                }
 
@@ -372,13 +370,13 @@ public:
 static const wxCmdLineEntryDesc command_line_description[] = {
        { wxCMD_LINE_OPTION, "l", "log", "set log level (silent, verbose or timing)", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
         { wxCMD_LINE_PARAM, 0, 0, "film to load", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
-       { wxCMD_LINE_NONE }
+       { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
 };
 #else
 static const wxCmdLineEntryDesc command_line_description[] = {
        { wxCMD_LINE_OPTION, wxT("l"), wxT("log"), wxT("set log level (silent, verbose or timing)"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
         { wxCMD_LINE_PARAM, 0, 0, wxT("film to load"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
-       { wxCMD_LINE_NONE }
+       { wxCMD_LINE_NONE, wxT(""), wxT(""), wxT(""), wxCmdLineParamType (0), 0 }
 };
 #endif