summaryrefslogtreecommitdiff
path: root/src/wx/metadata_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-03 02:02:53 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-04 20:48:35 +0200
commit4b8b74ae8ae721f2fbf317f1d7ce5be6048ae1b0 (patch)
tree657138b1d1254363719f674230bb41b26d2cd311 /src/wx/metadata_dialog.cc
parent8d9e73b753ed51067d93aa377bb24400ff22936e (diff)
Move chain to the Interop/SMPTE metadata.
Diffstat (limited to 'src/wx/metadata_dialog.cc')
-rw-r--r--src/wx/metadata_dialog.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/wx/metadata_dialog.cc b/src/wx/metadata_dialog.cc
index 75b2eff69..c6d28922b 100644
--- a/src/wx/metadata_dialog.cc
+++ b/src/wx/metadata_dialog.cc
@@ -78,6 +78,8 @@ MetadataDialog::setup ()
_facility->Bind (wxEVT_TEXT, boost::bind(&MetadataDialog::facility_changed, this));
_enable_studio->Bind (wxEVT_CHECKBOX, boost::bind(&MetadataDialog::enable_studio_changed, this));
_studio->Bind (wxEVT_TEXT, boost::bind(&MetadataDialog::studio_changed, this));
+ _enable_chain->Bind (wxEVT_CHECKBOX, boost::bind(&MetadataDialog::enable_chain_changed, this));
+ _chain->Bind (wxEVT_TEXT, boost::bind(&MetadataDialog::chain_changed, this));
_temp_version->Bind (wxEVT_CHECKBOX, boost::bind(&MetadataDialog::temp_version_changed, this));
_pre_release->Bind (wxEVT_CHECKBOX, boost::bind(&MetadataDialog::pre_release_changed, this));
_red_band->Bind (wxEVT_CHECKBOX, boost::bind(&MetadataDialog::red_band_changed, this));
@@ -92,6 +94,7 @@ MetadataDialog::setup ()
film_changed (ChangeType::DONE, Film::Property::PRE_RELEASE);
film_changed (ChangeType::DONE, Film::Property::RED_BAND);
film_changed (ChangeType::DONE, Film::Property::TWO_D_VERSION_OF_THREE_D);
+ film_changed (ChangeType::DONE, Film::Property::CHAIN);
setup_sensitivity ();
}
@@ -121,6 +124,11 @@ MetadataDialog::film_changed (ChangeType type, Film::Property property)
if (film()->studio()) {
checked_set (_studio, *film()->studio());
}
+ } else if (property == Film::Property::CHAIN) {
+ checked_set (_enable_chain, static_cast<bool>(film()->chain()));
+ if (film()->chain()) {
+ checked_set (_chain, *film()->chain());
+ }
} else if (property == Film::Property::TEMP_VERSION) {
checked_set (_temp_version, film()->temp_version());
} else if (property == Film::Property::PRE_RELEASE) {
@@ -171,6 +179,7 @@ MetadataDialog::setup_sensitivity ()
_release_territory_text->Enable (enabled);
_edit_release_territory->Enable (enabled);
_facility->Enable (_enable_facility->GetValue());
+ _chain->Enable (_enable_chain->GetValue());
_studio->Enable (_enable_studio->GetValue());
}
@@ -200,6 +209,11 @@ MetadataDialog::setup_advanced (wxPanel* panel, wxSizer* sizer)
_studio = new wxTextCtrl (panel, wxID_ANY);
sizer->Add (_studio, 1, wxEXPAND);
+ _enable_chain = new wxCheckBox (panel, wxID_ANY, _("Chain"));
+ sizer->Add (_enable_chain, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL);
+ _chain = new wxTextCtrl (panel, wxID_ANY);
+ sizer->Add (_chain, 1, wxEXPAND);
+
_temp_version = new wxCheckBox (panel, wxID_ANY, _("Temporary version"));
sizer->Add (_temp_version, 0, wxALIGN_CENTER_VERTICAL);
sizer->AddSpacer (0);
@@ -283,3 +297,23 @@ MetadataDialog::two_d_version_of_three_d_changed ()
film()->set_two_d_version_of_three_d(_two_d_version_of_three_d->GetValue());
}
+
+void
+MetadataDialog::chain_changed ()
+{
+ film()->set_chain (wx_to_std(_chain->GetValue()));
+}
+
+
+void
+MetadataDialog::enable_chain_changed ()
+{
+ setup_sensitivity ();
+ if (_enable_chain->GetValue()) {
+ film()->set_chain (wx_to_std(_chain->GetValue()));
+ } else {
+ film()->set_chain ();
+ }
+}
+
+