cur = cur->xmlChildrenNode;
+ Eina_Bool is_changed = EINA_FALSE;
while(cur != NULL)
{
if((!xmlStrcmp(cur->name, (const xmlChar *)"match")))
{
if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit")))
{
+ xmlChar *name = xmlGetProp(cur2, (const xmlChar *)"name");
+ SETTING_TRACE_DEBUG("name is: %s", name);
+ /* if name is not 'family', break */
+ if (xmlStrcmp(name, (const xmlChar *)"family"))
+ {
+ xmlFree(name);
+ name = NULL;
+ break;
+ }
+ xmlFree(name);
+ name = NULL;
+
cur3 = cur2->xmlChildrenNode;
while(cur3 != NULL)
{
{
xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
- SETTING_TRACE_DEBUG("after changed, string is: %s\n", key);
+ SETTING_TRACE_DEBUG("after changed, string is: %s", key);
+ xmlFree(key);
+ key = NULL;
+ is_changed = EINA_TRUE;
+ }
+ cur3 = cur3->next;
+ }
+ }
+ cur2 = cur2->next;
+ }
+ } else if ((!xmlStrcmp(cur->name, (const xmlChar *)"alias")))
+ {
+ cur2 = cur->xmlChildrenNode;
+ while (cur2 != NULL)
+ {
+ if ((!xmlStrcmp(cur2->name, (const xmlChar *)"family")))
+ {
+ xmlNodeSetContent(cur2->xmlChildrenNode, (const xmlChar *)font_name);
+ key = xmlNodeListGetString(doc, cur2->xmlChildrenNode, 1);
+ SETTING_TRACE_DEBUG("after changed, string is: %s", key);
+ xmlFree(key);
+ key = NULL;
+ is_changed = EINA_TRUE;
+ } else if ((!xmlStrcmp(cur2->name, (const xmlChar *)"prefer")))
+ {
+ cur3 = cur2->xmlChildrenNode;
+ while (cur3 != NULL)
+ {
+ if((!xmlStrcmp(cur3->name, (const xmlChar *)"family")))
+ {
+ xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name);
+ key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
+ SETTING_TRACE_DEBUG("after changed, string is: %s", key);
xmlFree(key);
key = NULL;
- return doc;
+ is_changed = EINA_TRUE;
+ cur3 = cur3->next;
+ break; /* just set first element, so break */
}
cur3 = cur3->next;
}
}
cur2 = cur2->next;
}
+
}
cur = cur->next;
}
- xmlFreeDoc(doc);
- doc = NULL;
- return NULL;
+ if (is_changed) {
+ return doc;
+ } else {
+ xmlFreeDoc(doc);
+ doc = NULL;
+ return NULL;
+ }
}
/**