- for (node = node->children; node; node = node->next)
- if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) {
- ObAction *a = action_parse
- (i, doc, node, OB_USER_ACTION_MENU_SELECTION);
- if (a)
- acts = g_slist_append(acts, a);
+ 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))
+ {
+ RrImage *ic;
+
+ ic = RrImageCacheFindName(ob_rr_icons, icon);
+ if (ic)
+ RrImageRef(ic);
+ else {
+ ic = RrImageNew(ob_rr_icons);
+ if (!RrImageAddPictureName(ic, icon)) {
+ RrImageUnref(ic); /* no need to keep it around */
+ ic = NULL;
+ }