mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
menu: support <action name="Execute"> option <execute>
<exectue> is a deprecated name for <command>. See: http://openbox.org/wiki/Help:Actions#Action_syntax But some openbox3 menu generators still use it, for example https://wiki.archlinux.org/title/xdg-menu - so let's support it for backward compatibility.
This commit is contained in:
parent
9554be0ce7
commit
5944813566
2 changed files with 10 additions and 1 deletions
|
|
@ -12,7 +12,9 @@ Actions are used in keyboard bindings.
|
||||||
Close top-most view.
|
Close top-most view.
|
||||||
|
|
||||||
*<action name="Execute"><command>*
|
*<action name="Execute"><command>*
|
||||||
Execute command.
|
Execute command. Note that in the interest of backward compatibility,
|
||||||
|
labwc supports <execute> as an alternative to <command> even though
|
||||||
|
openbox documentation states that it is deprecated.
|
||||||
|
|
||||||
*<action name="Exit">*
|
*<action name="Exit">*
|
||||||
Exit labwc.
|
Exit labwc.
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,13 @@ fill_item(char *nodename, char *content)
|
||||||
"nodename: '%s' content: '%s'", nodename, content);
|
"nodename: '%s' content: '%s'", nodename, content);
|
||||||
} else if (!strcmp(nodename, "command.action")) {
|
} else if (!strcmp(nodename, "command.action")) {
|
||||||
current_item_action->arg = strdup(content);
|
current_item_action->arg = strdup(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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue