use obt_xml_* to navigate the xml file (also XML tags are case sensitive)

This commit is contained in:
Dana Jansens 2010-01-08 14:33:58 -05:00
parent 424ea14e81
commit 0b3cfc9de5

View file

@ -274,12 +274,14 @@ static void parse_menu_item(xmlNodePtr node, gpointer data)
if (obt_xml_attr_string(node, "label", &label)) { if (obt_xml_attr_string(node, "label", &label)) {
GSList *acts = NULL; GSList *acts = NULL;
for (node = node->children; node; node = node->next) node = obt_xml_find_node(node->children, "action");
if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) { while (node) {
ObActionsAct *a = actions_parse(node); ObActionsAct *action = actions_parse(node);
if (a) if (action)
acts = g_slist_append(acts, a); acts = g_slist_append(acts, action);
node = obt_xml_find_node(node->next, "action");
} }
menu_add_normal(state->parent, -1, label, acts, TRUE); menu_add_normal(state->parent, -1, label, acts, TRUE);
g_free(label); g_free(label);
} }