X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.cc;h=8c76671d4f4062702e1be17ff4524595e8d49919;hb=b688d7362de5c0319284a74f46d17928b1be91eb;hp=76c70ed5dacbf75ca78b66f0077e18af1ba78de8;hpb=7d293a3268c320f474d42fef15548635c3cb40b0;p=dcpomatic.git diff --git a/src/lib/config.cc b/src/lib/config.cc index 76c70ed5d..8c76671d4 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -162,6 +162,7 @@ Config::set_defaults () _christie_password = optional(); _gdc_username = optional(); _gdc_password = optional(); + _interface_complexity = INTERFACE_SIMPLE; _allowed_dcp_frame_rates.clear (); _allowed_dcp_frame_rates.push_back (24); @@ -476,6 +477,11 @@ try _gdc_username = f.optional_string_child("GDCUsername"); _gdc_password = f.optional_string_child("GDCPassword"); + optional ic = f.optional_string_child("InterfaceComplexity"); + if (ic && *ic == "simple") { + _interface_complexity = INTERFACE_SIMPLE; + } + /* Replace any cinemas from config.xml with those from the configured file */ if (boost::filesystem::exists (_cinemas_file)) { cxml::Document f ("Cinemas"); @@ -840,6 +846,15 @@ Config::write_config () const root->add_child("GDCPassword")->add_child_text(*_gdc_password); } + 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; + } + try { doc.write_to_file_formatted(config_file().string()); } catch (xmlpp::exception& e) {