Merge master.
[dcpomatic.git] / src / wx / kdm_dialog.cc
index 42b8297f0fc64e608c6580bbcabee6b9cce5f956..4334fd446ce99ae7dad7665fc4dc471072f2903c 100644 (file)
@@ -96,7 +96,7 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
 
 
        /* Sub-heading: Timing */
-       h = new wxStaticText (this, wxID_ANY, _("Timing"));
+       h = new wxStaticText (this, wxID_ANY, S_("KDM|Timing"));
        h->SetFont (subheading_font);
        vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
        
@@ -159,6 +159,16 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
        
        table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, 0);
 
+       add_label_to_sizer (table, this, _("KDM type"), true);
+       _type = new wxChoice (this, wxID_ANY);
+       _type->Append ("Modified Transitional 1", ((void *) dcp::MODIFIED_TRANSITIONAL_1));
+       if (!film->interop ()) {
+               _type->Append ("DCI Any", ((void *) dcp::DCI_ANY));
+               _type->Append ("DCI Specific", ((void *) dcp::DCI_SPECIFIC));
+       }
+       table->Add (_type, 1, wxEXPAND);
+       _type->SetSelection (0);
+
        _write_to = new wxRadioButton (this, wxID_ANY, _("Write to"));
        table->Add (_write_to, 1, wxEXPAND);
 
@@ -480,6 +490,12 @@ KDMDialog::write_to () const
        return _write_to->GetValue ();
 }
 
+dcp::Formulation
+KDMDialog::formulation () const
+{
+       return (dcp::Formulation) reinterpret_cast<intptr_t> (_type->GetClientData (_type->GetSelection()));
+}
+
 void
 KDMDialog::update_cpl_choice ()
 {