mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
config/rcxml: Prevent overwriting action argument
This commit is contained in:
parent
f0a3f365e5
commit
c484ab252e
1 changed files with 6 additions and 0 deletions
|
|
@ -71,6 +71,9 @@ fill_keybind(char *nodename, char *content)
|
|||
} else if (!current_keybind_action) {
|
||||
wlr_log(WLR_ERROR, "expect <action name=\"\"> element first. "
|
||||
"nodename: '%s' content: '%s'", nodename, content);
|
||||
} else if (current_keybind_action->arg) {
|
||||
wlr_log(WLR_ERROR, "Action argument already set: %s",
|
||||
current_keybind_action->arg);
|
||||
} else if (!strcmp(nodename, "command.action")) {
|
||||
current_keybind_action->arg = strdup(content);
|
||||
} else if (!strcmp(nodename, "direction.action")) {
|
||||
|
|
@ -125,6 +128,9 @@ fill_mousebind(char *nodename, char *content)
|
|||
} else if (!current_mousebind_action) {
|
||||
wlr_log(WLR_ERROR, "expect <action name=\"\"> element first. "
|
||||
"nodename: '%s' content: '%s'", nodename, content);
|
||||
} else if (current_mousebind_action->arg) {
|
||||
wlr_log(WLR_ERROR, "Action argument already set: %s",
|
||||
current_mousebind_action->arg);
|
||||
} else if (!strcmp(nodename, "command.action")) {
|
||||
current_mousebind_action->arg = strdup(content);
|
||||
} else if (!strcmp(nodename, "direction.action")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue