projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remember the path used for "add files" (#2049).
[dcpomatic.git]
/
src
/
lib
/
config.cc
diff --git
a/src/lib/config.cc
b/src/lib/config.cc
index ce02b046e4e91635857ec0a2daee5df1535097dc..a8653a10c891a2dd766fc89b140498443a63c03e 100644
(file)
--- a/
src/lib/config.cc
+++ b/
src/lib/config.cc
@@
-176,6
+176,7
@@
Config::set_defaults ()
_player_kdm_directory = boost::none;
_audio_mapping = boost::none;
_custom_languages.clear ();
_player_kdm_directory = boost::none;
_audio_mapping = boost::none;
_custom_languages.clear ();
+ _add_files_path = boost::none;
_allowed_dcp_frame_rates.clear ();
_allowed_dcp_frame_rates.push_back (24);
_allowed_dcp_frame_rates.clear ();
_allowed_dcp_frame_rates.push_back (24);
@@
-553,6
+554,8
@@
try
} catch (std::runtime_error& e) {}
}
} catch (std::runtime_error& e) {}
}
+ _add_files_path = f.optional_string_child("AddFilesPath");
+
if (boost::filesystem::exists (_cinemas_file)) {
cxml::Document f ("Cinemas");
f.read_file (_cinemas_file);
if (boost::filesystem::exists (_cinemas_file)) {
cxml::Document f ("Cinemas");
f.read_file (_cinemas_file);
@@
-976,6
+979,10
@@
Config::write_config () const
for (auto const& i: _custom_languages) {
root->add_child("CustomLanguage")->add_child_text(i.to_string());
}
for (auto const& i: _custom_languages) {
root->add_child("CustomLanguage")->add_child_text(i.to_string());
}
+ if (_add_files_path) {
+ /* [XML] The default path that will be offered in the picker when adding files to a film */
+ root->add_child("AddFilesPath")->add_child_text(_add_files_path->string());
+ }
try {
auto const s = doc.write_to_string_formatted ();
try {
auto const s = doc.write_to_string_formatted ();