src/action.c: Convert action->arg to a list of action_arg

In preperation for Actions that require multiple arguments
This commit is contained in:
Consolatis 2022-06-10 19:42:34 +02:00 committed by Johan Malm
parent baaee26937
commit 9b49f19a73
8 changed files with 142 additions and 61 deletions

View file

@ -238,16 +238,16 @@ fill_item(char *nodename, char *content)
wlr_log(WLR_ERROR, "expect <action name=\"\"> element first. "
"nodename: '%s' content: '%s'", nodename, content);
} else if (!strcmp(nodename, "command.action")) {
current_item_action->arg = strdup(content);
action_arg_add_str(current_item_action, NULL, content);
} else if (!strcmp(nodename, "execute.action")) {
/*
* <action name="Execute"><execute>foo</execute></action>
* is deprecated, but we support it anyway for backward
* compatibility with old openbox-menu generators
*/
current_item_action->arg = strdup(content);
action_arg_add_str(current_item_action, NULL, content);
} else if (!strcmp(nodename, "to.action")) {
current_item_action->arg = strdup(content);
action_arg_add_str(current_item_action, NULL, content);
}
}