]> Dogcows Code - chaz/openbox/commitdiff
use obt_xml_* to navigate the xml file (also XML tags are case sensitive)
authorDana Jansens <danakj@orodu.net>
Fri, 8 Jan 2010 19:33:58 +0000 (14:33 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 8 Jan 2010 19:33:58 +0000 (14:33 -0500)
openbox/menu.c

index a78cd6129cc93617f8c0ab04ae56ace68a121232..fcf5d1689e904d71234f1fb43be0666420c999b0 100644 (file)
@@ -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);
         }
This page took 0.024388 seconds and 4 git commands to generate.