mirror of
https://github.com/labwc/labwc.git
synced 2026-02-15 22:05:25 -05:00
common/parse-bool.c: make parse_bool() generic
...to avoid multiple versions of a boolean-parser. - Optionally take a default value - Return -1 on error - Rename get-bool.c to parse-bool.c
This commit is contained in:
parent
473f0aacbd
commit
fa50149525
7 changed files with 144 additions and 64 deletions
|
|
@ -7,9 +7,9 @@
|
|||
#include <unistd.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "action.h"
|
||||
#include "common/get-bool.h"
|
||||
#include "common/list.h"
|
||||
#include "common/mem.h"
|
||||
#include "common/parse-bool.h"
|
||||
#include "common/spawn.h"
|
||||
#include "debug.h"
|
||||
#include "labwc.h"
|
||||
|
|
@ -154,7 +154,7 @@ action_arg_from_xml_node(struct action *action, char *nodename, char *content)
|
|||
action_arg_add_str(action, "to", content);
|
||||
} else if (!strcmp(nodename, "follow.action")) {
|
||||
/* SendToDesktop */
|
||||
action_arg_add_bool(action, "follow", get_bool(content));
|
||||
action_arg_add_bool(action, "follow", parse_bool(content, true));
|
||||
} else if (!strcmp(nodename, "region.action")) {
|
||||
/* SnapToRegion */
|
||||
action_arg_add_str(action, NULL, content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue