diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-09-04 21:57:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-04 23:16:55 +0200 |
| commit | 323146ee516476d76de5b56fdbc08747bf832825 (patch) | |
| tree | 5a0ce013fbe13008ec011d56e648c2f484d4f36d /src/wx | |
| parent | b09d636b86252ad5beda782edc613fa3449cd7b0 (diff) | |
Revert "Remove timing selection from DKDM dialog." (#3017).
This reverts commit ce01ccc1aa871d299ad96683055c4e06a355efb9.
Turns out there are quite a few people and pieces of software who care
about this.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/dkdm_dialog.cc | 14 | ||||
| -rw-r--r-- | src/wx/dkdm_dialog.h | 2 | ||||
| -rw-r--r-- | src/wx/dkdm_output_panel.cc | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/src/wx/dkdm_dialog.cc b/src/wx/dkdm_dialog.cc index 050651c15..f8afa3d71 100644 --- a/src/wx/dkdm_dialog.cc +++ b/src/wx/dkdm_dialog.cc @@ -24,6 +24,7 @@ #include "dkdm_dialog.h" #include "dkdm_output_panel.h" #include "kdm_cpl_panel.h" +#include "kdm_timing_panel.h" #include "recipients_panel.h" #include "static_text.h" #include "wx_util.h" @@ -80,6 +81,14 @@ DKDMDialog::DKDMDialog (wxWindow* parent, shared_ptr<const Film> film) _recipients = new RecipientsPanel (this); left->Add (_recipients, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP); + /* Sub-heading: Timing */ + /// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix + h = new StaticText (this, S_("KDM|Timing")); + h->SetFont (subheading_font); + right->Add (h); + _timing = new KDMTimingPanel (this); + right->Add (_timing); + /* Sub-heading: CPL */ h = new StaticText (this, _("CPL")); h->SetFont (subheading_font); @@ -114,6 +123,7 @@ DKDMDialog::DKDMDialog (wxWindow* parent, shared_ptr<const Film> film) _recipients->RecipientsChanged.connect (boost::bind(&DKDMDialog::setup_sensitivity, this)); _output->MethodChanged.connect(boost::bind(&DKDMDialog::setup_sensitivity, this)); + _timing->TimingChanged.connect (boost::bind(&DKDMDialog::setup_sensitivity, this)); _make->Bind (wxEVT_BUTTON, boost::bind(&DKDMDialog::make_clicked, this)); _cpl->Changed.connect(boost::bind(&DKDMDialog::setup_sensitivity, this)); @@ -130,7 +140,7 @@ DKDMDialog::setup_sensitivity () { _recipients->setup_sensitivity (); _output->setup_sensitivity (); - _make->Enable(!_recipients->recipients().empty() && _cpl->has_selected() && _output->method_selected()); + _make->Enable(!_recipients->recipients().empty() && _timing->valid() && _cpl->has_selected() && _output->method_selected()); } @@ -153,7 +163,7 @@ DKDMDialog::make_clicked () list<KDMWithMetadataPtr> kdms; try { for (auto i: _recipients->recipients()) { - auto p = kdm_for_dkdm_recipient(film, _cpl->cpl(), i); + auto p = kdm_for_dkdm_recipient(film, _cpl->cpl(), i, _timing->from(), _timing->until()); if (p) { kdms.push_back (p); } diff --git a/src/wx/dkdm_dialog.h b/src/wx/dkdm_dialog.h index fb3dbf903..4a47d961f 100644 --- a/src/wx/dkdm_dialog.h +++ b/src/wx/dkdm_dialog.h @@ -30,6 +30,7 @@ LIBDCP_ENABLE_WARNINGS class DKDMOutputPanel; class Film; class KDMCPLPanel; +class KDMTimingPanel; class RecipientsPanel; class ScreensPanel; struct CPLSummary; @@ -47,6 +48,7 @@ private: std::weak_ptr<const Film> _film; RecipientsPanel* _recipients; + KDMTimingPanel* _timing; KDMCPLPanel* _cpl; DKDMOutputPanel* _output; wxButton* _make; diff --git a/src/wx/dkdm_output_panel.cc b/src/wx/dkdm_output_panel.cc index 643987f26..3c14d1643 100644 --- a/src/wx/dkdm_output_panel.cc +++ b/src/wx/dkdm_output_panel.cc @@ -67,10 +67,14 @@ DKDMOutputPanel::DKDMOutputPanel(wxWindow* parent) titles['f'] = wx_to_std(_("film name")); titles['r'] = wx_to_std(_("recipient name")); titles['i'] = wx_to_std(_("CPL ID")); + titles['b'] = wx_to_std(_("from date/time")); + titles['e'] = wx_to_std(_("to date/time")); dcp::NameFormat::Map ex; ex['f'] = "Bambi"; ex['r'] = "Pathé"; ex['i'] = "1234-5678"; + ex['b'] = "2012/03/15 12:30"; + ex['e'] = "2012/03/22 02:30"; _filename_format = new NameFormatEditor(this, Config::instance()->dkdm_filename_format(), titles, ex, ".xml"); table->Add(_filename_format->panel(), 1, wxEXPAND); |
