Use XMLNode::set_property API in UIConfiguration class
authorTim Mayberry <mojofunk@gmail.com>
Mon, 29 Aug 2016 12:02:11 +0000 (22:02 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 18 Apr 2017 23:36:57 +0000 (09:36 +1000)
gtk2_ardour/ui_config.cc

index 2a555970c4db321a4517a2c010375acc10c91c6a..4254350353e8807915aa933de53217b5cd335b9d 100644 (file)
@@ -370,10 +370,10 @@ UIConfiguration::store_color_theme ()
        XMLNode* parent = new XMLNode (X_("Colors"));
        for (Colors::const_iterator i = colors.begin(); i != colors.end(); ++i) {
                XMLNode* node = new XMLNode (X_("Color"));
-               node->add_property (X_("name"), i->first);
+               node->set_property (X_("name"), i->first);
                stringstream ss;
                ss << "0x" << setw (8) << setfill ('0') << hex << i->second;
-               node->add_property (X_("value"), ss.str());
+               node->set_property (X_("value"), ss.str());
                parent->add_child_nocopy (*node);
        }
        root->add_child_nocopy (*parent);
@@ -381,8 +381,8 @@ UIConfiguration::store_color_theme ()
        parent = new XMLNode (X_("ColorAliases"));
        for (ColorAliases::const_iterator i = color_aliases.begin(); i != color_aliases.end(); ++i) {
                XMLNode* node = new XMLNode (X_("ColorAlias"));
-               node->add_property (X_("name"), i->first);
-               node->add_property (X_("alias"), i->second);
+               node->set_property (X_("name"), i->first);
+               node->set_property (X_("alias"), i->second);
                parent->add_child_nocopy (*node);
        }
        root->add_child_nocopy (*parent);
@@ -390,8 +390,8 @@ UIConfiguration::store_color_theme ()
        parent = new XMLNode (X_("Modifiers"));
        for (Modifiers::const_iterator i = modifiers.begin(); i != modifiers.end(); ++i) {
                XMLNode* node = new XMLNode (X_("Modifier"));
-               node->add_property (X_("name"), i->first);
-               node->add_property (X_("modifier"), i->second.to_string());
+               node->set_property (X_("name"), i->first);
+               node->set_property (X_("modifier"), i->second.to_string());
                parent->add_child_nocopy (*node);
        }
        root->add_child_nocopy (*parent);