X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fconfig.cc;h=79486c6025966ed67197f7f816f9d0345ef96f1b;hb=fdb1cacf58115881bd4d3e8cca8ba389f26400df;hp=f41d40e0931300ae9a8f648067a18154309a568c;hpb=ab32017c7cc918ddd2cd35661cf64985e0abc79a;p=dcpomatic.git diff --git a/src/lib/config.cc b/src/lib/config.cc index f41d40e09..79486c602 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2016 Carl Hetherington + Copyright (C) 2012-2017 Carl Hetherington This file is part of DCP-o-matic. @@ -115,6 +115,7 @@ Config::set_defaults () _kdm_filename_format = dcp::NameFormat ("KDM %f %c %s"); _dcp_metadata_filename_format = dcp::NameFormat ("%t"); _dcp_asset_filename_format = dcp::NameFormat ("%t"); + _jump_to_selected = true; _allowed_dcp_frame_rates.clear (); _allowed_dcp_frame_rates.push_back (24); @@ -307,6 +308,7 @@ try _kdm_filename_format = dcp::NameFormat (f.optional_string_child("KDMFilenameFormat").get_value_or ("KDM %f %c %s")); _dcp_metadata_filename_format = dcp::NameFormat (f.optional_string_child("DCPMetadataFilenameFormat").get_value_or ("%t")); _dcp_asset_filename_format = dcp::NameFormat (f.optional_string_child("DCPAssetFilenameFormat").get_value_or ("%t")); + _jump_to_selected = f.optional_bool_child("JumpToSelected").get_value_or (true); /* Replace any cinemas from config.xml with those from the configured file */ if (boost::filesystem::exists (_cinemas_file)) { @@ -474,6 +476,7 @@ Config::write_config () const root->add_child("KDMContainerNameFormat")->add_child_text (_kdm_container_name_format.specification ()); root->add_child("DCPMetadataFilenameFormat")->add_child_text (_dcp_metadata_filename_format.specification ()); root->add_child("DCPAssetFilenameFormat")->add_child_text (_dcp_asset_filename_format.specification ()); + root->add_child("JumpToSelected")->add_child_text (_jump_to_selected ? "1" : "0"); try { doc.write_to_file_formatted (path("config.xml").string ());