- for (node = node->children; node; node = node->next)
- if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) {
- ObActionsAct *a = actions_parse(i, doc, node);
- if (a)
- acts = g_slist_append(acts, a);
- }
- menu_add_normal(state->parent, -1, label, acts, TRUE);
+ c = obt_xml_find_node(node->children, "action");
+ while (c) {
+ ObActionsAct *action = actions_parse(c);
+ if (action)
+ acts = g_slist_append(acts, action);
+ c = obt_xml_find_node(node->next, "action");
+ }
+ e = menu_add_normal(state->parent, -1, label, acts, TRUE);
+
+ if (config_menu_show_icons &&
+ obt_xml_attr_string(node, "icon", &icon))
+ {
+ e->data.normal.icon = RrImageNewFromName(ob_rr_icons, icon);
+
+ if (e->data.normal.icon)
+ e->data.normal.icon_alpha = 0xff;
+
+ g_free(icon);
+ }