Try to enable some WGL stuff.
[dcpomatic.git] / src / wx / kdm_dialog.cc
index f59250750bc590734c13efc4e93b11cfb3d30ee4..55b89a37128925841dafbcada17040c9faac4508 100644 (file)
 #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"
@@ -87,7 +87,15 @@ KDMDialog::KDMDialog (wxWindow* parent, shared_ptr<const Film> film)
        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 ());
+
+       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 */
@@ -97,7 +105,7 @@ KDMDialog::KDMDialog (wxWindow* parent, shared_ptr<const Film> film)
        _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 */
@@ -141,7 +149,7 @@ KDMDialog::make_clicked ()
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
 
-       list<ScreenKDM> screen_kdms;
+       list<shared_ptr<ScreenKDM> > screen_kdms;
        try {
 
                screen_kdms = film->make_kdms (