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

This commit is contained in:
Daniel Eklöf 2019-01-12 12:48:42 +01:00
parent f3721d9d80
commit fb9f07dcad
4 changed files with 26 additions and 20 deletions

View file

@ -362,13 +362,6 @@ conf_to_particle(const struct yml_node *node, const struct font *parent_font)
return ret;
}
static struct module *
module_label_from_config(const struct yml_node *node, const struct font *parent_font)
{
const struct yml_node *c = yml_get_value(node, "content");
return module_label(conf_to_particle(c, parent_font));
}
static struct module *
module_xwindow_from_config(const struct yml_node *node, const struct font *parent_font)
{
@ -527,9 +520,9 @@ conf_to_bar(const struct yml_node *bar)
mods[idx] = module_clock.from_conf(m.value, font);
else if (strcmp(mod_name, "i3") == 0)
mods[idx] = module_i3.from_conf(m.value, font);
else if (strcmp(mod_name, "label") == 0)
mods[idx] = module_label_from_config(m.value, font);
mods[idx] = module_label.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)