*/
+#include "check_box.h"
#include "content_version_dialog.h"
#include "editable_list.h"
#include "language_tag_dialog.h"
#endif
-static string
-ratings_column (dcp::Rating r, int c)
-{
- if (c == 0) {
- return r.agency;
- }
-
- return r.label;
-}
-
-
static string
content_versions_column (string v, int)
{
sizer->Add (m, 0, flags, DCPOMATIC_SIZER_GAP);
}
- vector<EditableListColumn> columns;
- columns.push_back (EditableListColumn("Agency", 200, true));
- columns.push_back (EditableListColumn("Label", 50, true));
- _ratings = new EditableList<dcp::Rating, RatingDialog> (
- panel,
- columns,
- boost::bind(&SMPTEMetadataDialog::ratings, this),
- boost::bind(&SMPTEMetadataDialog::set_ratings, this, _1),
- boost::bind(&ratings_column, _1, _2),
- true,
- EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
- );
sizer->Add (_ratings, 1, wxEXPAND);
}
_status = new wxChoice (panel, wxID_ANY);
sizer->Add (_status, 0);
- _enable_distributor = new wxCheckBox (panel, wxID_ANY, _("Distributor"));
+ _enable_distributor = new CheckBox(panel, _("Distributor"));
sizer->Add (_enable_distributor, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL);
_distributor = new wxTextCtrl (panel, wxID_ANY);
sizer->Add (_distributor, 1, wxEXPAND);
boost::bind(&SMPTEMetadataDialog::content_versions, this),
boost::bind(&SMPTEMetadataDialog::set_content_versions, this, _1),
boost::bind(&content_versions_column, _1, _2),
- true,
- false
+ EditableListTitle::INVISIBLE,
+ EditableListButton::NEW | EditableListButton::REMOVE
);
sizer->Add (_content_versions, 1, wxEXPAND);
}
_name_language->Changed.connect (boost::bind(&SMPTEMetadataDialog::name_language_changed, this, _1));
_version_number->Bind (wxEVT_SPINCTRL, boost::bind(&SMPTEMetadataDialog::version_number_changed, this));
_status->Bind (wxEVT_CHOICE, boost::bind(&SMPTEMetadataDialog::status_changed, this));
- _enable_distributor->Bind (wxEVT_CHECKBOX, boost::bind(&SMPTEMetadataDialog::enable_distributor_changed, this));
+ _enable_distributor->bind(&SMPTEMetadataDialog::enable_distributor_changed, this);
_distributor->Bind (wxEVT_TEXT, boost::bind(&SMPTEMetadataDialog::distributor_changed, this));
film_changed (ChangeType::DONE, Film::Property::NAME_LANGUAGE);
}
-vector<dcp::Rating>
-SMPTEMetadataDialog::ratings () const
-{
- return film()->ratings ();
-}
-
-
-void
-SMPTEMetadataDialog::set_ratings (vector<dcp::Rating> r)
-{
- film()->set_ratings (r);
-}
-
-
vector<string>
SMPTEMetadataDialog::content_versions () const
{