+ FocusManager::instance()->add(_name);
+
+ _use_isdcf_name = new CheckBox (_panel, _("Use ISDCF name"));
+ _edit_isdcf_button = new wxButton (_panel, wxID_ANY, _("Details..."));
+ _copy_isdcf_name_button = new wxButton (_panel, wxID_ANY, _("Copy as name"));
+
+ /* wxST_ELLIPSIZE_MIDDLE works around a bug in GTK2 and/or wxWidgets, see
+ http://trac.wxwidgets.org/ticket/12539
+ */
+ _dcp_name = new StaticText (
+ _panel, wxT (""), wxDefaultPosition, wxDefaultSize,
+ wxALIGN_CENTRE_HORIZONTAL | wxST_NO_AUTORESIZE | wxST_ELLIPSIZE_MIDDLE
+ );
+
+ _dcp_content_type_label = create_label (_panel, _("Content Type"), true);
+ _dcp_content_type = new wxChoice (_panel, wxID_ANY);
+
+ _signed = new CheckBox (_panel, _("Signed"));
+ _encrypted = new CheckBox (_panel, _("Encrypted"));
+
+ wxClientDC dc (_panel);
+ wxSize size = dc.GetTextExtent (wxT ("GGGGGGGG..."));
+ size.SetHeight (-1);
+
+ _key_label = create_label (_panel, _("Key"), true);
+ _key = new StaticText (_panel, "", wxDefaultPosition, size);
+ _edit_key = new wxButton (_panel, wxID_ANY, _("Edit..."));
+
+ _reels_label = create_label (_panel, _("Reels"), true);
+ _reel_type = new wxChoice (_panel, wxID_ANY);
+
+ _reel_length_label = create_label (_panel, _("Reel length"), true);
+ _reel_length = new wxSpinCtrl (_panel, wxID_ANY);
+ _reel_length_gb_label = create_label (_panel, _("GB"), false);
+
+ _standard_label = create_label (_panel, _("Standard"), true);
+ _standard = new wxChoice (_panel, wxID_ANY);
+
+ _upload_after_make_dcp = new CheckBox (_panel, _("Upload DCP to TMS after it is made"));
+
+ _notebook = new wxNotebook (_panel, wxID_ANY);
+ _sizer->Add (_notebook, 1, wxEXPAND | wxTOP, 6);
+
+ _notebook->AddPage (make_video_panel (), _("Video"), false);
+ _notebook->AddPage (make_audio_panel (), _("Audio"), false);
+
+ _name->Bind (wxEVT_TEXT, boost::bind (&DCPPanel::name_changed, this));
+ _use_isdcf_name->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::use_isdcf_name_toggled, this));
+ _edit_isdcf_button->Bind (wxEVT_BUTTON, boost::bind (&DCPPanel::edit_isdcf_button_clicked, this));
+ _copy_isdcf_name_button->Bind(wxEVT_BUTTON, boost::bind (&DCPPanel::copy_isdcf_name_button_clicked, this));
+ _dcp_content_type->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::dcp_content_type_changed, this));
+ _signed->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::signed_toggled, this));
+ _encrypted->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::encrypted_toggled, this));
+ _edit_key->Bind (wxEVT_BUTTON, boost::bind (&DCPPanel::edit_key_clicked, this));
+ _reel_type->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::reel_type_changed, this));
+ _reel_length->Bind (wxEVT_SPINCTRL, boost::bind (&DCPPanel::reel_length_changed, this));
+ _standard->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::standard_changed, this));
+ _upload_after_make_dcp->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::upload_after_make_dcp_changed, this));
+
+ BOOST_FOREACH (DCPContentType const * i, DCPContentType::all()) {
+ _dcp_content_type->Append (std_to_wx (i->pretty_name ()));
+ }
+
+ _reel_type->Append (_("Single reel"));
+ _reel_type->Append (_("Split by video content"));
+ /// TRANSLATORS: translate the word "Custom" here; do not include the "Reel|" prefix
+ _reel_type->Append (S_("Reel|Custom"));
+
+ _reel_length->SetRange (1, 64);
+
+ _standard->Append (_("SMPTE"));
+ _standard->Append (_("Interop"));
+
+ Config::instance()->Changed.connect (boost::bind (&DCPPanel::config_changed, this, _1));
+
+ add_to_grid ();
+}
+
+void
+DCPPanel::add_to_grid ()
+{
+ Config::Interface interface = Config::instance()->interface_complexity ();
+
+ int r = 0;
+
+ add_label_to_sizer (_grid, _name_label, true, wxGBPosition (r, 0));
+ _grid->Add (_name, wxGBPosition(r, 1), wxDefaultSpan, wxEXPAND | wxLEFT | wxRIGHT);