Request confirmation before resetting preferences (#867).
authorCarl Hetherington <cth@carlh.net>
Tue, 26 Apr 2016 23:02:16 +0000 (00:02 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 29 Apr 2016 21:51:18 +0000 (22:51 +0100)
ChangeLog
src/tools/dcpomatic.cc

index 3c0ee0d99af8b29a2573d3bfaa7ef23b03f55e6e..75a3e19711116cc320d84b199bb4dda8cce549b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-27  Carl Hetherington  <cth@carlh.net>
+
+       * Request confirmation before resetting preferences (#867).
+
 2016-04-29  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.8.0 released.
index 6f5bdd6640a3f92a894302cafc648c214f94ae86..f336f0a854ee1672b12278f18c090e7fcc6d7cc7 100644 (file)
@@ -416,7 +416,19 @@ private:
 
        void tools_restore_default_preferences ()
        {
-               Config::restore_defaults ();
+               wxMessageDialog* d = new wxMessageDialog (
+                       0,
+                       _("Are you sure you want to restore preferences to their defaults?  This cannot be undone."),
+                       _("Restore default preferences"),
+                       wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION
+                       );
+
+               int const r = d->ShowModal ();
+               d->Destroy ();
+
+               if (r == wxID_YES) {
+                       Config::restore_defaults ();
+               }
        }
 
        void jobs_make_dcp ()