From 0b3cfc9de550f3f922bfb3c41acb96bbb1e00b64 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 8 Jan 2010 14:33:58 -0500 Subject: [PATCH] use obt_xml_* to navigate the xml file (also XML tags are case sensitive) --- openbox/menu.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/openbox/menu.c b/openbox/menu.c index a78cd612..fcf5d168 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -274,12 +274,14 @@ static void parse_menu_item(xmlNodePtr node, gpointer data) if (obt_xml_attr_string(node, "label", &label)) { GSList *acts = NULL; - for (node = node->children; node; node = node->next) - if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) { - ObActionsAct *a = actions_parse(node); - if (a) - acts = g_slist_append(acts, a); - } + node = obt_xml_find_node(node->children, "action"); + while (node) { + ObActionsAct *action = actions_parse(node); + if (action) + acts = g_slist_append(acts, action); + node = obt_xml_find_node(node->next, "action"); + } + menu_add_normal(state->parent, -1, label, acts, TRUE); g_free(label); } -- 2.45.2