plugin.title);
if (plugin.description != null) {
- device_element->new_child (null,
- "modelDescription",
- plugin.description);
+ this.set_description (device_element, plugin.description);
}
/* Then list each icon */
}
}
+ private void set_description (Xml.Node *device_element,
+ string description) {
+ Xml.Node *element = XMLUtils.get_element (device_element,
+ "modelDescription",
+ null);
+ if (element == null) {
+ device_element->new_child (null, "modelDescription", description);
+ }
+
+ element->set_content (description);
+ }
+
private void add_services_to_desc (Xml.Node *device_element,
Plugin plugin) {
Xml.Node *service_list_node = XMLUtils.get_element (device_element,