+class FilmChangedDuplicatingDialog : public boost::noncopyable
+{
+public:
+ explicit FilmChangedDuplicatingDialog (string name)
+ {
+ _dialog = new wxMessageDialog (
+ 0,
+ wxString::Format (_("Save changes to film \"%s\" before duplicating?"), std_to_wx (name).data()),
+ /// TRANSLATORS: this is the heading for a dialog box, which tells the user that the current
+ /// project (Film) has been changed since it was last saved.
+ _("Film changed"),
+ wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_QUESTION
+ );
+
+ _dialog->SetYesNoCancelLabels (
+ _("Save film and duplicate"), _("Duplicate without saving film"), _("Don't duplicate")
+ );
+ }
+
+ ~FilmChangedDuplicatingDialog ()
+ {
+ _dialog->Destroy ();
+ }
+
+ int run ()
+ {
+ return _dialog->ShowModal ();
+ }
+
+private:
+ wxMessageDialog* _dialog;
+};
+
+#define ALWAYS 0x0
+#define NEEDS_FILM 0x1
+#define NOT_DURING_DCP_CREATION 0x2
+#define NEEDS_CPL 0x4
+#define NEEDS_SINGLE_SELECTED_CONTENT 0x8
+#define NEEDS_SELECTED_CONTENT 0x10
+#define NEEDS_SELECTED_VIDEO_CONTENT 0x20
+#define NEEDS_CLIPBOARD 0x40
+#define NEEDS_ENCRYPTION 0x80