Make DCPoMatic compatible with ICU >= 75
[dcpomatic.git] / src / wx / film_name_location_dialog.cc
index 516ed86ae9cbf0fbc3e6ba960b797b31a141994d..6c54f184872d483a02bf9f86abb0cc4368801967 100644 (file)
 #include "check_box.h"
 #include "film_name_location_dialog.h"
 #include "wx_util.h"
+/* This must come after wx_util.h as it defines DCPOMATIC_USE_OWN_PICKER */
 #ifdef DCPOMATIC_USE_OWN_PICKER
 #include "dir_picker_ctrl.h"
 #endif
-#include "lib/config.h"
 #include "lib/compose.hpp"
+#include "lib/config.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/stdpaths.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
 
 
@@ -35,7 +39,7 @@ using namespace std;
 using namespace boost;
 
 
-optional<filesystem::path> FilmNameLocationDialog::_directory;
+boost::optional<boost::filesystem::path> FilmNameLocationDialog::_directory;
 
 
 FilmNameLocationDialog::FilmNameLocationDialog (wxWindow* parent, wxString title, bool offer_templates)
@@ -74,7 +78,7 @@ FilmNameLocationDialog::FilmNameLocationDialog (wxWindow* parent, wxString title
                        _template_name->Append (std_to_wx(i));
                }
 
-               _use_template->Bind (wxEVT_CHECKBOX, bind(&FilmNameLocationDialog::use_template_clicked, this));
+               _use_template->bind(&FilmNameLocationDialog::use_template_clicked, this);
        }
 
        layout ();
@@ -108,17 +112,17 @@ FilmNameLocationDialog::folder_changed ()
 }
 
 
-filesystem::path
+boost::filesystem::path
 FilmNameLocationDialog::path () const
 {
-       filesystem::path p;
+       boost::filesystem::path p;
        p /= wx_to_std (_folder->GetPath());
        p /= wx_to_std (_name->GetValue());
        return p;
 }
 
 
-optional<string>
+boost::optional<string>
 FilmNameLocationDialog::template_name () const
 {
        if (!_use_template->GetValue() || _template_name->GetSelection() == -1) {
@@ -135,7 +139,7 @@ FilmNameLocationDialog::template_name () const
 bool
 FilmNameLocationDialog::check_path ()
 {
-       if (filesystem::is_directory(path()) && !filesystem::is_empty(path())) {
+       if (boost::filesystem::is_directory(path()) && !boost::filesystem::is_empty(path())) {
                if (!confirm_dialog (
                            this,
                            std_to_wx (