all repos — openbox @ 0b3cfc9de550f3f922bfb3c41acb96bbb1e00b64

openbox fork - make it a bit more like ryudo

use obt_xml_* to navigate the xml file (also XML tags are case sensitive)
Dana Jansens danakj@orodu.net
commit

0b3cfc9de550f3f922bfb3c41acb96bbb1e00b64

parent

424ea14e8101f28ecc2d968abb2e06e4929a5230

1 files changed, 8 insertions(+), 6 deletions(-)

jump to
M openbox/menu.copenbox/menu.c

@@ -274,12 +274,14 @@ if (state->parent) {

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); }