diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-09 11:24:03 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-09 11:24:03 +0100 |
| commit | 89ae13638097f259f3e50b4b61068dd23451107d (patch) | |
| tree | d58d8d0d10e5582b959ec41286943e6f4d81b8ac /src/lib/config.cc | |
| parent | 7844347e7d89ffb256167192fb414c35d416e14d (diff) | |
Simple cover sheet support (#1039).
Diffstat (limited to 'src/lib/config.cc')
| -rw-r--r-- | src/lib/config.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index c0ab44923..a19a60f55 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -132,6 +132,7 @@ Config::set_defaults () _allowed_dcp_frame_rates.push_back (60); set_kdm_email_to_default (); + set_cover_sheet_to_default (); } void @@ -329,6 +330,9 @@ try } _preview_sound = f.optional_bool_child("PreviewSound").get_value_or (false); _preview_sound_output = f.optional_string_child("PreviewSoundOutput"); + if (f.optional_string_child("CoverSheet")) { + _cover_sheet = f.optional_string_child("CoverSheet").get(); + } /* Replace any cinemas from config.xml with those from the configured file */ if (boost::filesystem::exists (_cinemas_file)) { @@ -514,6 +518,7 @@ Config::write_config () const if (_preview_sound_output) { root->add_child("PreviewSoundOutput")->add_child_text (_preview_sound_output.get()); } + root->add_child("CoverSheet")->add_child_text (_cover_sheet); try { doc.write_to_file_formatted (path("config.xml").string ()); @@ -608,6 +613,18 @@ Config::reset_kdm_email () } void +Config::set_cover_sheet_to_default () +{ + _cover_sheet = _( + "$CPL_NAME\n\n" + "Type: $TYPE\n" + "Format: $CONTAINER\n" + "Audio: $AUDIO\n" + "Length: $LENGTH\n" + ); +} + +void Config::add_to_history (boost::filesystem::path p) { /* Remove existing instances of this path in the history */ @@ -707,3 +724,10 @@ Config::config_path () { return path("config.xml", false); } + +void +Config::reset_cover_sheet () +{ + set_cover_sheet_to_default (); + changed (); +} |
