summaryrefslogtreecommitdiff
path: root/src/wx/verify_dcp_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-01-13 00:29:56 +0100
committerCarl Hetherington <cth@carlh.net>2026-01-13 00:35:30 +0100
commitdd0d98fefd7520752a603ff262aae293c50a917c (patch)
tree8b283a7b2ad94fd5324758d21f097972e14d480e /src/wx/verify_dcp_dialog.cc
parent501096cb9a14e1722ee3d84ecdbd41f79df6467a (diff)
Add context menu option to verify DCPs from the main DoM (#2054).
Diffstat (limited to 'src/wx/verify_dcp_dialog.cc')
-rw-r--r--src/wx/verify_dcp_dialog.cc38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/wx/verify_dcp_dialog.cc b/src/wx/verify_dcp_dialog.cc
index 9fd77c367..c25899e2d 100644
--- a/src/wx/verify_dcp_dialog.cc
+++ b/src/wx/verify_dcp_dialog.cc
@@ -52,7 +52,41 @@ VerifyDCPDialog::VerifyDCPDialog(
, _result_panel(new VerifyDCPResultPanel(this))
, _cancel_pending(false)
, _dcp_directories(std::move(dcp_directories))
- , _kdms(std::move(kdms))
+{
+ setup();
+
+ if (auto key = Config::instance()->decryption_chain()->key()) {
+ for (auto const& kdm: kdms) {
+ _kdms.push_back(dcp::DecryptedKDM{dcp::EncryptedKDM(dcp::file_to_string(kdm)), *key});
+ }
+ }
+}
+
+
+VerifyDCPDialog::VerifyDCPDialog(
+ wxWindow* parent,
+ wxString title,
+ vector<boost::filesystem::path> dcp_directories,
+ vector<dcp::EncryptedKDM> const& kdms
+ )
+ : wxDialog (parent, wxID_ANY, title)
+ , _progress_panel(new VerifyDCPProgressPanel(this))
+ , _result_panel(new VerifyDCPResultPanel(this))
+ , _cancel_pending(false)
+ , _dcp_directories(std::move(dcp_directories))
+{
+ setup();
+
+ if (auto key = Config::instance()->decryption_chain()->key()) {
+ for (auto const& kdm: kdms) {
+ _kdms.push_back(dcp::DecryptedKDM{kdm, *key});
+ }
+ }
+}
+
+
+void
+VerifyDCPDialog::setup()
{
auto overall_sizer = new wxBoxSizer (wxVERTICAL);
@@ -76,7 +110,7 @@ VerifyDCPDialog::VerifyDCPDialog(
overall_sizer->Add(_progress_panel, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_GAP);
overall_sizer->Add(_result_panel, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_GAP);
- SetSizerAndFit (overall_sizer);
+ SetSizerAndFit(overall_sizer);
_verify->bind(&VerifyDCPDialog::verify_clicked, this);
_cancel->bind(&VerifyDCPDialog::cancel_clicked, this);