+Gdk::Color Principal::get_rgb_from_xml(xmlNodePtr nodo)
+{
+ unsigned r,g,b;
+ while (nodo != NULL) {
+ if (nodo->type == XML_ELEMENT_NODE) {
+ if (xmlStrcmp(nodo->name, BAD_CAST"r")==0)
+ r = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ if (xmlStrcmp(nodo->name, BAD_CAST"g")==0)
+ g = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ if (xmlStrcmp(nodo->name, BAD_CAST"b")==0)
+ b = atoi( (char *)XML_GET_CONTENT(nodo->children) );
+ }
+ nodo = nodo->next;
+ }
+ r = 65535 * r / 255;
+ g = 65535 * g / 255;
+ b = 65535 * b / 255;
+ Gdk::Color c;
+ c.set_rgb(r,g,b);
+
+ return c;
+}