Fix error when opening the right-click content menu.
[dcpomatic.git] / src / wx / metadata_dialog.h
index cda8d2acec2df2c2511f078cadc31f870edbb416..5b4efb8c92ac0734aa4c9fc01c345572cce4fdb1 100644 (file)
@@ -25,8 +25,9 @@
 
 #include "editable_list.h"
 #include "lib/change_signaller.h"
-#include "lib/film.h"
+#include "lib/film_property.h"
 #include "lib/weak_film.h"
+#include <dcp/rating.h>
 #include <dcp/warnings.h>
 LIBDCP_DISABLE_WARNINGS
 #include <wx/wx.h>
@@ -39,6 +40,7 @@ class CheckBox;
 class Choice;
 class LanguageTagWidget;
 class RatingDialog;
+class RegionSubtagWidget;
 class wxSpinCtrlDouble;
 
 
@@ -52,7 +54,7 @@ public:
 protected:
        virtual void setup_standard (wxPanel*, wxSizer*);
        virtual void setup_advanced (wxPanel*, wxSizer*);
-       virtual void film_changed (ChangeType type, Film::Property property);
+       virtual void film_changed(ChangeType type, FilmProperty property);
        virtual void setup_sensitivity ();
 
        EditableList<dcp::Rating, RatingDialog>* _ratings;
@@ -60,7 +62,7 @@ protected:
 
 private:
        void sign_language_video_language_changed ();
-       void edit_release_territory ();
+       void release_territory_changed(boost::optional<dcp::LanguageTag::RegionSubtag> tag);
        void enable_release_territory_changed ();
        void facility_changed ();
        void enable_facility_changed ();
@@ -76,15 +78,16 @@ private:
        void luminance_changed ();
        std::vector<dcp::Rating> ratings () const;
        void set_ratings (std::vector<dcp::Rating> r);
+       void territory_type_changed();
 
        CheckBox* _enable_release_territory;
        /** The current release territory displayed in the UI; since we can't easily convert
         *  the string in _release_territory_text to a RegionSubtag we just store the RegionSubtag
         *  alongside.
         */
-       boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory;
-       wxStaticText* _release_territory_text;
-       Button* _edit_release_territory;
+       boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory_copy;
+       RegionSubtagWidget* _release_territory;
+       Choice* _territory_type;
        LanguageTagWidget* _sign_language_video_language = nullptr;
        CheckBox* _enable_facility;
        wxTextCtrl* _facility;