summaryrefslogtreecommitdiff
path: root/src/wx/verify_dcp_progress_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-02-20 23:10:50 +0100
committerCarl Hetherington <cth@carlh.net>2025-02-23 01:47:38 +0100
commit81d8c747c7a04be10821223dea69faf058b05b1d (patch)
tree98f58e45012c3133e719024fe8c84d7b9c691811 /src/wx/verify_dcp_progress_panel.cc
parent6628b2573f601b7448da169453d5f113534e525e (diff)
Allow verification of multiple DCPs in one go (#2843).
Diffstat (limited to 'src/wx/verify_dcp_progress_panel.cc')
-rw-r--r--src/wx/verify_dcp_progress_panel.cc23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/wx/verify_dcp_progress_panel.cc b/src/wx/verify_dcp_progress_panel.cc
index a99791911..2b0455ca1 100644
--- a/src/wx/verify_dcp_progress_panel.cc
+++ b/src/wx/verify_dcp_progress_panel.cc
@@ -19,7 +19,7 @@
*/
-#include "lib/job.h"
+#include "lib/verify_dcp_job.h"
#include "verify_dcp_progress_panel.h"
#include "wx_util.h"
@@ -37,6 +37,12 @@ VerifyDCPProgressPanel::VerifyDCPProgressPanel(wxWindow* parent)
{
auto overall_sizer = new wxBoxSizer(wxVERTICAL);
+ _directory_name = new wxStaticText(this, wxID_ANY, {});
+ wxFont directory_name_font(*wxNORMAL_FONT);
+ directory_name_font.SetFamily(wxFONTFAMILY_MODERN);
+ _directory_name->SetFont(directory_name_font);
+ overall_sizer->Add(_directory_name, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_SIZER_GAP);
+
_job_name = new wxStaticText(this, wxID_ANY, {});
overall_sizer->Add(_job_name, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_SIZER_GAP);
@@ -61,8 +67,11 @@ VerifyDCPProgressPanel::VerifyDCPProgressPanel(wxWindow* parent)
void
-VerifyDCPProgressPanel::update(shared_ptr<Job> job)
+VerifyDCPProgressPanel::update(shared_ptr<const VerifyDCPJob> job)
{
+ DCPOMATIC_ASSERT(!job->directories().empty());
+ checked_set(_directory_name, std_to_wx(job->directories()[0].filename().string()));
+
auto const progress = job->progress();
if (progress) {
_progress->SetValue(*progress * 100);
@@ -85,3 +94,13 @@ VerifyDCPProgressPanel::update(shared_ptr<Job> job)
}
}
+
+void
+VerifyDCPProgressPanel::clear()
+{
+ _directory_name->SetLabel(wxT(""));
+ _job_name->SetLabel(wxT(""));
+ _file_name->SetLabel(wxT(""));
+ _progress->SetValue(0);
+}
+