diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-03-28 00:12:01 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-05-10 23:43:42 +0100 |
| commit | 6bfda50f36b35a6635e9da7a25f84319ca29d92f (patch) | |
| tree | d2463513424cfa5fa8428385bc504e51da77e50e /src | |
| parent | 186b5a423b58f4f6457d11852cdbd0abc2f89f69 (diff) | |
Nag about deletion of DKDMs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/config.h | 1 | ||||
| -rw-r--r-- | src/tools/dcpomatic_kdm.cc | 11 | ||||
| -rw-r--r-- | src/wx/wx_util.cc | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/config.h b/src/lib/config.h index 8cc25d737..1d0501ce4 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -376,6 +376,7 @@ public: /* Not really a nag but it's the same idea */ NAG_INITIAL_SETUP, NAG_IMPORT_DECRYPTION_CHAIN, + NAG_DELETE_DKDM, NAG_COUNT }; diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 3b97fa2da..2b0d25836 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2015-2017 Carl Hetherington <cth@carlh.net> + Copyright (C) 2015-2019 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -33,6 +33,7 @@ #include "wx/editable_list.h" #include "wx/static_text.h" #include "wx/dcpomatic_button.h" +#include "wx/nag_dialog.h" #include "lib/config.h" #include "lib/util.h" #include "lib/screen.h" @@ -523,6 +524,14 @@ private: return; } + if (NagDialog::maybe_nag ( + this, Config::NAG_DELETE_DKDM, + _("You are about to remove a DKDM. This will make it impossible to decrypt the DCP that the DKDM was made for, and it cannot be undone. " + "Are you sure?"), + true)) { + return; + } + _dkdm->Delete (dkdm_to_id (removed)); shared_ptr<DKDMGroup> dkdms = Config::instance()->dkdms (); dkdms->remove (removed); diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index bfc7c3069..1a537c087 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -158,6 +158,7 @@ message_dialog (wxWindow* parent, wxString m) d->Destroy (); } +/** @return true if the user answered "yes" */ bool confirm_dialog (wxWindow* parent, wxString m) { |
