Note that newer libsub version is required.
[dcpomatic.git] / src / wx / dkdm_dialog.cc
index 5743cd71204bf079cc53fa61f952cf89e37febb3..34a8d6284f0419757963b4138d4eb13df05c10b9 100644 (file)
 #include "lib/film.h"
 #include "lib/job_manager.h"
 #include "lib/kdm_with_metadata.h"
-#include "lib/warnings.h"
 #include <libcxml/cxml.h>
 #include <dcp/exceptions.h>
-DCPOMATIC_DISABLE_WARNINGS
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/listctrl.h>
 #include <wx/treectrl.h>
-DCPOMATIC_ENABLE_WARNINGS
-#include <iostream>
+LIBDCP_ENABLE_WARNINGS
 
 
-using std::cout;
 using std::exception;
 using std::list;
 using std::make_pair;
@@ -108,7 +106,7 @@ DKDMDialog::DKDMDialog (wxWindow* parent, shared_ptr<const Film> film)
        /* Sub-heading: Output */
        h = new StaticText (this, _("Output"));
        h->SetFont (subheading_font);
-       right->Add (h, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
+       right->Add(h, 0, wxTOP, DCPOMATIC_SUBHEADING_TOP_PAD);
        _output = new DKDMOutputPanel (this);
        right->Add (_output, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP);
 
@@ -125,6 +123,7 @@ DKDMDialog::DKDMDialog (wxWindow* parent, shared_ptr<const Film> film)
        _recipients->RecipientsChanged.connect (boost::bind(&DKDMDialog::setup_sensitivity, this));
        _timing->TimingChanged.connect (boost::bind(&DKDMDialog::setup_sensitivity, this));
        _make->Bind (wxEVT_BUTTON, boost::bind(&DKDMDialog::make_clicked, this));
+       _cpl->Changed.connect(boost::bind(&DKDMDialog::setup_sensitivity, this));
 
        setup_sensitivity ();
 
@@ -171,7 +170,7 @@ DKDMDialog::make_clicked ()
                if (e.starts_too_early()) {
                        error_dialog (this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period.  Use a later start time for this KDM."));
                } else {
-                       error_dialog (this, _("The KDM end period is after (or close to) the end of the signing certficates' validity period.  Either use an earlier end time for this KDM or re-create your signing certificates in the DCP-o-matic preferences window."));
+                       error_dialog (this, _("The KDM end period is after (or close to) the end of the signing certificates' validity period.  Either use an earlier end time for this KDM or re-create your signing certificates in the DCP-o-matic preferences window."));
                }
                return;
        } catch (runtime_error& e) {
@@ -179,7 +178,7 @@ DKDMDialog::make_clicked ()
                return;
        }
 
-       auto result = _output->make (kdms, film->name(), bind(&DKDMDialog::confirm_overwrite, this, _1));
+       auto result = _output->make(kdms, film->dcp_name(), bind(&DKDMDialog::confirm_overwrite, this, _1));
        if (result.first) {
                JobManager::instance()->add (result.first);
        }