Remove the "simple" UI (#1868).
[dcpomatic.git] / src / lib / config.cc
index a138cc8796f47a24c22ac92f0e0e9bfe11790e8e..8b849dcc163b90d0bed2e68a5eae8eaa88801127 100644 (file)
@@ -104,7 +104,7 @@ Config::set_defaults ()
        _default_j2k_bandwidth = 150000000;
        _default_audio_delay = 0;
        _default_interop = true;
-       _default_upload_after_make_dcp = false;
+       _upload_after_make_dcp = false;
        _mail_server = "";
        _mail_port = 25;
        _mail_protocol = EMAIL_PROTOCOL_AUTO;
@@ -165,7 +165,6 @@ Config::set_defaults ()
        _christie_password = optional<string>();
        _gdc_username = optional<string>();
        _gdc_password = optional<string>();
-       _interface_complexity = INTERFACE_SIMPLE;
        _player_mode = PLAYER_MODE_WINDOW;
        _image_display = 0;
        _video_view_type = VIDEO_VIEW_SIMPLE;
@@ -317,8 +316,16 @@ try
                _dcp_issuer = f.string_child ("DCPIssuer");
        }
 
-       _default_upload_after_make_dcp = f.optional_bool_child("DefaultUploadAfterMakeDCP").get_value_or (false);
+       optional<bool> up = f.optional_bool_child("UploadAfterMakeDCP");
+       if (!up) {
+               up = f.optional_bool_child("DefaultUploadAfterMakeDCP");
+       }
+       _upload_after_make_dcp = up.get_value_or (false);
        _dcp_creator = f.optional_string_child ("DCPCreator").get_value_or ("");
+       _dcp_company_name = f.optional_string_child("DCPCompanyName").get_value_or("");
+       _dcp_product_name = f.optional_string_child("DCPProductName").get_value_or("");
+       _dcp_product_version = f.optional_string_child("DCPProductVersion").get_value_or("");
+       _dcp_j2k_comment = f.optional_string_child("DCPJ2KComment").get_value_or("");
 
        if (version && version.get() >= 2) {
                _default_isdcf_metadata = ISDCFMetadata (f.node_child ("ISDCFMetadata"));
@@ -563,10 +570,6 @@ try
        _gdc_username = f.optional_string_child("GDCUsername");
        _gdc_password = f.optional_string_child("GDCPassword");
 
-       optional<string> ic = f.optional_string_child("InterfaceComplexity");
-       if (ic && *ic == "full") {
-               _interface_complexity = INTERFACE_FULL;
-       }
        optional<string> pm = f.optional_string_child("PlayerMode");
        if (pm && *pm == "window") {
                _player_mode = PLAYER_MODE_WINDOW;
@@ -725,8 +728,16 @@ Config::write_config () const
        root->add_child("DCPIssuer")->add_child_text (_dcp_issuer);
        /* [XML] DCPIssuer Creator text to write into CPL files. */
        root->add_child("DCPCreator")->add_child_text (_dcp_creator);
-       /* [XML] DefaultUploadAfterMakeDCP 1 to default to uploading to a TMS after making a DCP, 0 to default to no upload. */
-       root->add_child("DefaultUploadAfterMakeDCP")->add_child_text (_default_upload_after_make_dcp ? "1" : "0");
+       /* [XML] Company name to write into MXF files. */
+       root->add_child("DCPCompanyName")->add_child_text (_dcp_company_name);
+       /* [XML] Product name to write into MXF files. */
+       root->add_child("DCPProductName")->add_child_text (_dcp_product_name);
+       /* [XML] Product version to write into MXF files. */
+       root->add_child("DCPProductVersion")->add_child_text (_dcp_product_version);
+       /* [XML] Comment to write into JPEG2000 data. */
+       root->add_child("DCPJ2KComment")->add_child_text (_dcp_j2k_comment);
+       /* [XML] UploadAfterMakeDCP 1 to upload to a TMS after making a DCP, 0 for no upload. */
+       root->add_child("UploadAfterMakeDCP")->add_child_text (_upload_after_make_dcp ? "1" : "0");
 
        /* [XML] ISDCFMetadata Default ISDCF metadata to use for new films; child tags are <code>&lt;ContentVersion&gt;</code>,
           <code>&lt;AudioLanguage&gt;</code>, <code>&lt;SubtitleLanguage&gt;</code>, <code>&lt;Territory&gt;</code>,
@@ -984,24 +995,14 @@ Config::write_config () const
        }
 
        if (_gdc_username) {
-               /* [XML] GCCUsername Username for logging into GDC's servers when downloading server certificates. */
+               /* [XML] GDCUsername Username for logging into GDC's servers when downloading server certificates. */
                root->add_child("GDCUsername")->add_child_text(*_gdc_username);
        }
        if (_gdc_password) {
-               /* [XML] GCCPassword Password for logging into GDC's servers when downloading server certificates. */
+               /* [XML] GDCPassword Password for logging into GDC's servers when downloading server certificates. */
                root->add_child("GDCPassword")->add_child_text(*_gdc_password);
        }
 
-       /* [XML] InterfaceComplexity <code>simple</code> for the reduced interface or <code>full</code> for the full interface. */
-       switch (_interface_complexity) {
-       case INTERFACE_SIMPLE:
-               root->add_child("InterfaceComplexity")->add_child_text("simple");
-               break;
-       case INTERFACE_FULL:
-               root->add_child("InterfaceComplexity")->add_child_text("full");
-               break;
-       }
-
        /* [XML] PlayerMode <code>window</code> for a single window, <code>full</code> for full-screen and <code>dual</code> for full screen playback
           with controls on another monitor.
        */