From 414e2efc51d27b788116d3f2bf541cad7f4ee925 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 11 Feb 2026 12:30:03 +0100 Subject: Allow adding multiple DCPs to the verifier in one go, and remember the last location. --- src/lib/config.cc | 1 + src/tools/dcpomatic_verifier.cc | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/config.cc b/src/lib/config.cc index 03c4bb72d..a2469ed8a 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -200,6 +200,7 @@ Config::set_defaults() _initial_paths["SelectCertificatePath"] = boost::none; _initial_paths["AddCombinerInputPath"] = boost::none; _initial_paths["AddEditorInputPath"] = boost::none; + _initial_paths["AddVerifierInputPath"] = boost::none; _initial_paths["ExportSubtitlesPath"] = boost::none; _initial_paths["ExportVideoPath"] = boost::none; _initial_paths["DebugLogPath"] = boost::none; diff --git a/src/tools/dcpomatic_verifier.cc b/src/tools/dcpomatic_verifier.cc index 8a480abe5..78f4b94ff 100644 --- a/src/tools/dcpomatic_verifier.cc +++ b/src/tools/dcpomatic_verifier.cc @@ -27,6 +27,7 @@ #include "wx/about_dialog.h" #include "wx/check_box.h" #include "wx/dcpomatic_button.h" +#include "wx/dir_dialog.h" #include "wx/dir_picker_ctrl.h" #include "wx/editable_list.h" #include "wx/file_dialog.h" @@ -145,14 +146,16 @@ public: add_label_to_sizer(dcp_sizer, _overall_panel, _("DCPs"), true, 0, wxALIGN_CENTER_VERTICAL); auto add = [this](wxWindow* parent) { - wxDirDialog dialog(parent); + DirDialog dialog(parent, _("Select DCP(s)"), wxDD_MULTIPLE, "AddVerifierInputPath"); - if (dialog.ShowModal() == wxID_OK) { + if (dialog.show()) { wxProgressDialog progress(variant::wx::dcpomatic(), _("Examining DCPs")); vector paths; - for (auto const& dcp: dcp::find_potential_dcps(boost::filesystem::path(wx_to_std(dialog.GetPath())))) { - progress.Pulse(); - paths.push_back(DCPPath(dcp, _kdms)); + for (auto path: dialog.paths()) { + for (auto const& dcp: dcp::find_potential_dcps(path)) { + progress.Pulse(); + paths.push_back(DCPPath(dcp, _kdms)); + } } return paths; } else { -- cgit v1.2.3