summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-11-19 21:34:56 +0100
committerCarl Hetherington <cth@carlh.net>2023-11-20 07:31:44 +0100
commit16557827b252bd653b15eead479ec5699eda7360 (patch)
treef94f6822143802f2676c44e711984029eb3fb6cc /src/tools
parent9d1d75e474bc92d8b0f823141073ad9dd639c8e0 (diff)
Add a dialog to show which screens have potentially-problematic
certificate validity periods when making KDMs (#2645).
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_kdm.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index 8cf381283..9bb8e20a8 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -22,6 +22,7 @@
#include "wx/about_dialog.h"
#include "wx/dcpomatic_button.h"
#include "wx/editable_list.h"
+#include "wx/invalid_certificate_period_dialog.h"
#include "wx/file_dialog.h"
#include "wx/file_picker_ctrl.h"
#include "wx/full_config_dialog.h"
@@ -419,19 +420,16 @@ private:
return;
}
- if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OUTSIDE_CERTIFICATE) != period_checks.end()) {
- error_dialog(
- this,
- _("Some KDMs would have validity periods which are completely outside the recipient certificate periods. Such KDMs are very unlikely to work, so will not be created.")
- );
- return;
- }
-
- if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OVERLAPS_CERTIFICATE) != period_checks.end()) {
- message_dialog(
- this,
- _("For some of these KDMs the recipient certificate's validity period will not cover the whole of the KDM validity period. This might cause problems with the KDMs.")
- );
+ if (
+ find_if(
+ period_checks.begin(),
+ period_checks.end(),
+ [](KDMCertificatePeriod const& p) { return p.overlap != KDMCertificateOverlap::KDM_WITHIN_CERTIFICATE; }
+ ) != period_checks.end()) {
+ InvalidCertificatePeriodDialog dialog(this, period_checks);
+ if (dialog.ShowModal() == wxID_CANCEL) {
+ return;
+ }
}
auto result = _output->make (