summaryrefslogtreecommitdiff
path: root/src/wx/dkdm_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-09-04 21:57:49 +0200
committerCarl Hetherington <cth@carlh.net>2025-09-04 23:16:55 +0200
commit323146ee516476d76de5b56fdbc08747bf832825 (patch)
tree5a0ce013fbe13008ec011d56e648c2f484d4f36d /src/wx/dkdm_dialog.cc
parentb09d636b86252ad5beda782edc613fa3449cd7b0 (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/dkdm_dialog.cc')
-rw-r--r--src/wx/dkdm_dialog.cc14
1 files changed, 12 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);
}