/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "kdm_output_panel.h"
#include "kdm_cpl_panel.h"
#include "confirm_kdm_email_dialog.h"
+#include "static_text.h"
+#include "dcpomatic_button.h"
#include "lib/film.h"
#include "lib/screen.h"
#include "lib/screen_kdm.h"
-#include "lib/send_kdm_email_job.h"
#include "lib/job_manager.h"
#include "lib/cinema_kdms.h"
#include "lib/config.h"
using std::runtime_error;
using boost::shared_ptr;
using boost::bind;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
KDMDialog::KDMDialog (wxWindow* parent, shared_ptr<const Film> film)
: wxDialog (parent, wxID_ANY, _("Make KDMs"))
subheading_font.SetWeight (wxFONTWEIGHT_BOLD);
/* Sub-heading: Screens */
- wxStaticText* h = new wxStaticText (this, wxID_ANY, _("Screens"));
+ wxStaticText* h = new StaticText (this, _("Screens"));
h->SetFont (subheading_font);
- left->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
+ left->Add (h, 0, wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
_screens = new ScreensPanel (this);
left->Add (_screens, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
/* Sub-heading: Timing */
/// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix
- h = new wxStaticText (this, wxID_ANY, S_("KDM|Timing"));
+ h = new StaticText (this, S_("KDM|Timing"));
h->SetFont (subheading_font);
- right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
+ right->Add (h, 0, 0, DCPOMATIC_SIZER_Y_GAP * 2);
_timing = new KDMTimingPanel (this);
right->Add (_timing);
/* Sub-heading: CPL */
- h = new wxStaticText (this, wxID_ANY, _("CPL"));
+ h = new StaticText (this, _("CPL"));
h->SetFont (subheading_font);
- right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
- _cpl = new KDMCPLPanel (this, film->cpls ());
+ right->Add (h, 0, 0, DCPOMATIC_SIZER_Y_GAP * 2);
+
+ vector<CPLSummary> cpls;
+ BOOST_FOREACH (CPLSummary const & i, film->cpls()) {
+ if (i.encrypted) {
+ cpls.push_back (i);
+ }
+ }
+
+ _cpl = new KDMCPLPanel (this, cpls);
right->Add (_cpl, 0, wxEXPAND);
/* Sub-heading: Output */
- h = new wxStaticText (this, wxID_ANY, _("Output"));
+ h = new StaticText (this, _("Output"));
h->SetFont (subheading_font);
- right->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
+ right->Add (h, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
_output = new KDMOutputPanel (this, film->interop ());
right->Add (_output, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP);
- _make = new wxButton (this, wxID_ANY, _("Make KDMs"));
+ _make = new Button (this, _("Make KDMs"));
right->Add (_make, 0, wxTOP | wxBOTTOM, DCPOMATIC_SIZER_GAP);
/* Make an overall sizer to get a nice border */