Nag users to backup config.xml if they make a DKDM.
[dcpomatic.git] / src / tools / dcpomatic.cc
index e9a1f652cea81ef535369e8cb82604b855316a06..1ced8923b9e3a033c80c4bc361590d2847c6c058 100644 (file)
@@ -40,6 +40,7 @@
 #include "wx/video_waveform_dialog.h"
 #include "wx/save_template_dialog.h"
 #include "wx/templates_dialog.h"
+#include "wx/nag_dialog.h"
 #include "lib/film.h"
 #include "lib/config.h"
 #include "lib/util.h"
@@ -597,6 +598,17 @@ private:
                        return;
                }
 
+               NagDialog::maybe_nag (
+                       this,
+                       Config::NAG_DKDM_CONFIG,
+                       wxString::Format (
+                               _("You are making a DKDM which is encrypted by a private key held in"
+                                 "\n\n<tt>%s</tt>\n\nIt is <span weight=\"bold\" size=\"larger\">VITALLY IMPORTANT</span> "
+                                 "that you <span weight=\"bold\" size=\"larger\">BACK UP THIS FILE</span> since if it is lost "
+                                 "your DKDMs (and the DCPs they protect) will become useless."), std_to_wx(Config::config_path().string()).data()
+                               )
+                       );
+
                optional<dcp::EncryptedKDM> kdm;
                try {
                        kdm = _film->make_kdm (