module/xkb: export module info through the new module_info struct type

This commit is contained in:
Daniel Eklöf 2019-01-12 13:01:24 +01:00
parent 87640339e1
commit 905f289659
4 changed files with 25 additions and 20 deletions

View file

@ -369,14 +369,6 @@ module_xwindow_from_config(const struct yml_node *node, const struct font *paren
return module_xwindow(conf_to_particle(c, parent_font));
}
static struct module *
module_xkb_from_config(const struct yml_node *node,
const struct font *parent_font)
{
const struct yml_node *c = yml_get_value(node, "content");
return module_xkb(conf_to_particle(c, parent_font));
}
struct bar *
conf_to_bar(const struct yml_node *bar)
{
@ -485,12 +477,12 @@ conf_to_bar(const struct yml_node *bar)
mods[idx] = module_network.from_conf(m.value, font);
else if (strcmp(mod_name, "removables") == 0)
mods[idx] = module_removables.from_conf(m.value, font);
else if (strcmp(mod_name, "xkb") == 0)
mods[idx] = module_xkb.from_conf(m.value, font);
else if (strcmp(mod_name, "xwindow") == 0)
mods[idx] = module_xwindow_from_config(m.value, font);
else if (strcmp(mod_name, "xkb") == 0)
mods[idx] = module_xkb_from_config(m.value, font);
else
assert(false);
}