mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
action.c: remove duplicate code
This commit is contained in:
parent
49dfba1507
commit
d0b52139ed
1 changed files with 6 additions and 9 deletions
15
src/action.c
15
src/action.c
|
|
@ -168,15 +168,12 @@ action_arg_from_xml_node(struct action *action, char *nodename, char *content)
|
||||||
|
|
||||||
switch (action->type) {
|
switch (action->type) {
|
||||||
case ACTION_TYPE_EXECUTE:
|
case ACTION_TYPE_EXECUTE:
|
||||||
if (!strcmp(argument, "command")) {
|
/*
|
||||||
action_arg_add_str(action, argument, content);
|
* <action name="Execute"> with an <execute> child is
|
||||||
goto cleanup;
|
* deprecated, but we support it anyway for backward
|
||||||
} else if (!strcmp(argument, "execute")) {
|
* compatibility with old openbox-menu generators
|
||||||
/*
|
*/
|
||||||
* <action name="Execute"><execute>foo</execute></action>
|
if (!strcmp(argument, "command") || !strcmp(argument, "execute")) {
|
||||||
* is deprecated, but we support it anyway for backward
|
|
||||||
* compatibility with old openbox-menu generators
|
|
||||||
*/
|
|
||||||
action_arg_add_str(action, "command", content);
|
action_arg_add_str(action, "command", content);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue