mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
module/removables: export module info through the new module_info struct type
This commit is contained in:
parent
697e613b2e
commit
87640339e1
4 changed files with 39 additions and 36 deletions
|
@ -17,6 +17,7 @@
|
|||
#include "modules/label/label.h"
|
||||
#include "modules/mpd/mpd.h"
|
||||
#include "modules/network/network.h"
|
||||
#include "modules/removables/removables.h"
|
||||
|
||||
const char *
|
||||
conf_err_prefix(const keychain_t *chain, const struct yml_node *node)
|
||||
|
@ -438,14 +439,6 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
return false;
|
||||
}
|
||||
|
||||
static const struct attr_info removables[] = {
|
||||
{"spacing", false, &conf_verify_int},
|
||||
{"left-spacing", false, &conf_verify_int},
|
||||
{"right-spacing", false, &conf_verify_int},
|
||||
{"content", true, &conf_verify_particle},
|
||||
{"anchors", false, NULL},
|
||||
};
|
||||
|
||||
static const struct attr_info xkb[] = {
|
||||
{"content", true, &conf_verify_particle},
|
||||
{"anchors", false, NULL},
|
||||
|
@ -469,6 +462,7 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
{"label", &module_label},
|
||||
{"mpd", &module_mpd},
|
||||
{"network", &module_network},
|
||||
{"removables", &module_removables},
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -476,7 +470,6 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
const struct attr_info *attrs;
|
||||
size_t count;
|
||||
} modules[] = {
|
||||
{"removables", removables, sizeof(removables) / sizeof(removables[0])},
|
||||
{"xkb", xkb, sizeof(xkb) / sizeof(xkb[0])},
|
||||
{"xwindow", xwindow, sizeof(xwindow) / sizeof(xwindow[0])},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue