all repos — openbox @ 0cceca230318a63daa9ec896575379046f5d3a49

openbox fork - make it a bit more like ryudo

dont add null actions to the list
Dana Jansens danakj@orodu.net
commit

0cceca230318a63daa9ec896575379046f5d3a49

parent

556a08cec8ac15bf2d5e0fa8bcff753e3c3ae145

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

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

@@ -176,10 +176,12 @@ if (parse_attr_string("label", node, &label)) {

GSList *acts = NULL; for (node = node->children; node; node = node->next) - if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) - acts = g_slist_append(acts, action_parse - (i, doc, node, - OB_USER_ACTION_MENU_SELECTION)); + 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); + } menu_add_normal(state->parent, -1, label, acts); g_free(label); }