From dd0d98fefd7520752a603ff262aae293c50a917c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 13 Jan 2026 00:29:56 +0100 Subject: Add context menu option to verify DCPs from the main DoM (#2054). --- src/wx/verify_dcp_dialog.cc | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'src/wx/verify_dcp_dialog.cc') 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 dcp_directories, + vector 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); -- cgit v1.2.3