mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 12:35:41 +02:00
particles: verify: use conf_verify_unsigned() for options that should be >= 0
This commit is contained in:
parent
f166bbbf54
commit
4f0d27bc7e
4 changed files with 13 additions and 13 deletions
|
@ -77,9 +77,9 @@ void exposable_default_on_mouse(
|
||||||
|
|
||||||
/* List of attributes *all* particles implement */
|
/* List of attributes *all* particles implement */
|
||||||
#define PARTICLE_COMMON_ATTRS \
|
#define PARTICLE_COMMON_ATTRS \
|
||||||
{"margin", false, &conf_verify_int}, \
|
{"margin", false, &conf_verify_unsigned}, \
|
||||||
{"left-margin", false, &conf_verify_int}, \
|
{"left-margin", false, &conf_verify_unsigned}, \
|
||||||
{"right-margin", false, &conf_verify_int}, \
|
{"right-margin", false, &conf_verify_unsigned}, \
|
||||||
{"on-click", false, &conf_verify_on_click}, \
|
{"on-click", false, &conf_verify_on_click}, \
|
||||||
{"font", false, &conf_verify_font}, \
|
{"font", false, &conf_verify_font}, \
|
||||||
{"foreground", false, &conf_verify_color}, \
|
{"foreground", false, &conf_verify_color}, \
|
||||||
|
|
|
@ -208,9 +208,9 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
|
||||||
{
|
{
|
||||||
static const struct attr_info attrs[] = {
|
static const struct attr_info attrs[] = {
|
||||||
{"items", true, &conf_verify_particle_list_items},
|
{"items", true, &conf_verify_particle_list_items},
|
||||||
{"spacing", false, &conf_verify_int},
|
{"spacing", false, &conf_verify_unsigned},
|
||||||
{"left-spacing", false, &conf_verify_int},
|
{"left-spacing", false, &conf_verify_unsigned},
|
||||||
{"right-spacing", false, &conf_verify_int},
|
{"right-spacing", false, &conf_verify_unsigned},
|
||||||
PARTICLE_COMMON_ATTRS,
|
PARTICLE_COMMON_ATTRS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,7 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
|
||||||
{
|
{
|
||||||
static const struct attr_info attrs[] = {
|
static const struct attr_info attrs[] = {
|
||||||
{"tag", true, &conf_verify_string},
|
{"tag", true, &conf_verify_string},
|
||||||
{"length", true, &conf_verify_int},
|
{"length", true, &conf_verify_unsigned},
|
||||||
/* TODO: make these optional? Default to empty */
|
/* TODO: make these optional? Default to empty */
|
||||||
{"start", true, &conf_verify_particle},
|
{"start", true, &conf_verify_particle},
|
||||||
{"end", true, &conf_verify_particle},
|
{"end", true, &conf_verify_particle},
|
||||||
|
|
|
@ -323,7 +323,7 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
|
||||||
{
|
{
|
||||||
static const struct attr_info attrs[] = {
|
static const struct attr_info attrs[] = {
|
||||||
{"text", true, &conf_verify_string},
|
{"text", true, &conf_verify_string},
|
||||||
{"max", false, &conf_verify_int},
|
{"max", false, &conf_verify_unsigned},
|
||||||
PARTICLE_COMMON_ATTRS,
|
PARTICLE_COMMON_ATTRS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue