summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-11 00:10:22 +0200
committerCarl Hetherington <cth@carlh.net>2024-01-28 02:01:22 +0100
commit591c89275bfa26c3b2e1b0f1926909fc4bf5b219 (patch)
tree75dd0838141b38081bc754f6b88d4c56f7f5b083 /src/lib/config.cc
parentd0e74dea9d189187d456173702a54a3b3c72aca0 (diff)
Normalise XML attribute names to be camelCase (#2241).
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 1126d0bbd..c37d20e17 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -492,7 +492,7 @@ try
of the nags.
*/
for (auto i: f.node_children("Nagged")) {
- auto const id = i->number_attribute<int>("Id");
+ auto const id = number_attribute<int>(i, "Id", "id");
if (id >= 0 && id < NAG_COUNT) {
_nagged[id] = raw_convert<int>(i->content());
}
@@ -564,7 +564,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<int>("Id");
+ int const id = number_attribute<int>(i, "Id", "id");
if (id >= 0 && id < NOTIFICATION_COUNT) {
_notification[id] = raw_convert<int>(i->content());
}
@@ -962,7 +962,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<string>(i));
+ e->set_attribute("id", raw_convert<string>(i));
e->add_child_text (_nagged[i] ? "1" : "0");
}
/* [XML] PreviewSound 1 to use sound in the GUI preview and player, otherwise 0. */
@@ -1017,7 +1017,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<string>(i));
+ e->set_attribute("id", raw_convert<string>(i));
e->add_child_text (_notification[i] ? "1" : "0");
}