X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.cc;h=74a67668e5adbbc35d7bdb00b1a3fe9b46adba80;hb=d9751ad986905095db13cb147010b61c72b4332e;hp=063fbcab9b16f922151485045c44ec88a6f5e17b;hpb=96f50dd5e600925488fdd9db1580aa01b026269b;p=dcpomatic.git diff --git a/src/lib/config.cc b/src/lib/config.cc index 063fbcab9..74a67668e 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -25,7 +25,6 @@ #include "config.h" #include "constants.h" #include "cross.h" -#include "crypto.h" #include "dcp_content_type.h" #include "dkdm_recipient.h" #include "dkdm_wrapper.h" @@ -188,6 +187,7 @@ Config::set_defaults () _custom_languages.clear (); _initial_paths.clear(); _initial_paths["AddFilesPath"] = boost::none; + _initial_paths["AddKDMPath"] = boost::none; _initial_paths["AddDKDMPath"] = boost::none; _initial_paths["SelectCertificatePath"] = boost::none; _initial_paths["AddCombinerInputPath"] = boost::none; @@ -487,7 +487,7 @@ try of the nags. */ for (auto i: f.node_children("Nagged")) { - auto const id = i->number_attribute("Id"); + auto const id = number_attribute(i, "Id", "id"); if (id >= 0 && id < NAG_COUNT) { _nagged[id] = raw_convert(i->content()); } @@ -558,7 +558,7 @@ try _default_notify = f.optional_bool_child("DefaultNotify").get_value_or(false); for (auto i: f.node_children("Notification")) { - int const id = i->number_attribute("Id"); + int const id = number_attribute(i, "Id", "id"); if (id >= 0 && id < NOTIFICATION_COUNT) { _notification[id] = raw_convert(i->content()); } @@ -956,7 +956,7 @@ Config::write_config () const /* [XML] Nagged 1 if a particular nag screen has been shown and should not be shown again, otherwise 0. */ for (int i = 0; i < NAG_COUNT; ++i) { xmlpp::Element* e = root->add_child ("Nagged"); - e->set_attribute ("Id", raw_convert(i)); + e->set_attribute("id", raw_convert(i)); e->add_child_text (_nagged[i] ? "1" : "0"); } /* [XML] PreviewSound 1 to use sound in the GUI preview and player, otherwise 0. */ @@ -1011,7 +1011,7 @@ Config::write_config () const /* [XML] Notification 1 if a notification type is enabled, otherwise 0. */ for (int i = 0; i < NOTIFICATION_COUNT; ++i) { xmlpp::Element* e = root->add_child ("Notification"); - e->set_attribute ("Id", raw_convert(i)); + e->set_attribute("id", raw_convert(i)); e->add_child_text (_notification[i] ? "1" : "0"); }