summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-06 14:19:33 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-06 14:19:33 +0100
commit33a2c1355cc52372565835638bea0dab1e3f85a1 (patch)
treeafeb722b6be3437921d117f62e780cbfbc8b3a74 /src/lib
parentebc29bddd5cbc5cad23cc9b1095d842f55ece5e0 (diff)
Add simple/full interface option and make DCP panel respect it.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/config.cc15
-rw-r--r--src/lib/config.h15
2 files changed, 30 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 76c70ed5d..22eb5b0e2 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -162,6 +162,7 @@ Config::set_defaults ()
_christie_password = optional<string>();
_gdc_username = optional<string>();
_gdc_password = optional<string>();
+ _interface_complexity = INTERFACE_FULL;
_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<string> 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) {
diff --git a/src/lib/config.h b/src/lib/config.h
index 0be3b20b9..58db9c280 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -75,6 +75,7 @@ public:
CINEMAS,
SOUND,
SOUND_OUTPUT,
+ INTERFACE_COMPLEXITY,
OTHER
};
@@ -447,6 +448,15 @@ public:
return _gdc_password;
}
+ enum Interface {
+ INTERFACE_SIMPLE,
+ INTERFACE_FULL
+ };
+
+ Interface interface_complexity () const {
+ return _interface_complexity;
+ }
+
/* SET (mostly) */
void set_master_encoding_threads (int n) {
@@ -841,6 +851,10 @@ public:
maybe_set (_gdc_password, boost::optional<std::string>());
}
+ void set_interface_complexity (Interface i) {
+ maybe_set (_interface_complexity, i, INTERFACE_COMPLEXITY);
+ }
+
void changed (Property p = OTHER);
boost::signals2::signal<void (Property)> Changed;
/** Emitted if read() failed on an existing Config file. There is nothing
@@ -1022,6 +1036,7 @@ private:
boost::optional<std::string> _christie_password;
boost::optional<std::string> _gdc_username;
boost::optional<std::string> _gdc_password;
+ Interface _interface_complexity;
static int const _current_version;