summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-15 20:26:20 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-15 20:26:20 +0100
commitd361b99f8dc8b9b1bcde40e0056e3fc796e5583c (patch)
treeba2522b1a15ac3e662384dcd4d55754f69f0291f /src/tools
parente2eb94df38159c32c2d943a241510900f2ad1964 (diff)
Tell user what just happened if they get either of the disk writer confirmations wrong (#2417).
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_disk.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc
index e2cd108c1..d3235c1bb 100644
--- a/src/tools/dcpomatic_disk.cc
+++ b/src/tools/dcpomatic_disk.cc
@@ -367,12 +367,12 @@ private:
}
- auto * d = new DriveWipeWarningDialog (this, _drive->GetString(_drive->GetSelection()));
- int const r = d->ShowModal ();
- bool ok = r == wxID_OK && d->confirmed();
- d->Destroy ();
-
- if (!ok) {
+ auto d = make_wx<DriveWipeWarningDialog>(this, _drive->GetString(_drive->GetSelection()));
+ if (d->ShowModal() != wxID_OK) {
+ return;
+ }
+ if (!d->confirmed()) {
+ message_dialog(this, _("You did not correctly confirm that you read the warning that was just shown. Please try again."));
return;
}
@@ -478,12 +478,14 @@ public:
Config::drop ();
if (!_skip_alpha_check) {
- auto warning = new DiskWarningDialog ();
- warning->ShowModal ();
+ auto warning = make_wx<DiskWarningDialog>();
+ if (warning->ShowModal() != wxID_OK) {
+ return false;
+ }
if (!warning->confirmed()) {
+ message_dialog(nullptr, _("You did not correctly confirm that you read the warning that was just shown. DCP-o-matic Disk Writer will close now. Please try again."));
return false;
}
- warning->Destroy ();
}
_frame = new DOMFrame (_("DCP-o-matic Disk Writer"));