config: font_from_name() no longer accepts a tllist

This commit is contained in:
Daniel Eklöf 2019-12-01 19:29:36 +01:00
parent 8a4d9137ff
commit 677c43ea60
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -67,13 +67,7 @@ conf_to_color(const struct yml_node *node)
struct font *
conf_to_font(const struct yml_node *node)
{
font_list_t font_list = tll_init();
tll_push_back(font_list, yml_value_as_string(node));
struct font *font = font_from_name(font_list, NULL);
tll_free(font_list);
return font;
return font_from_name(&(const char *){yml_value_as_string(node)}, 1, NULL);
}
struct deco *
@ -269,11 +263,7 @@ conf_to_bar(const struct yml_node *bar, enum bar_backend backend)
* and particles. This allows us to specify a default font and
* foreground color at top-level.
*/
font_list_t font_list = tll_init();
tll_push_back(font_list, "sans");
struct font *font = font_from_name(font_list, NULL);
tll_free(font_list);
struct font *font = font_from_name(&(const char *){"sans"}, 1, NULL);
pixman_color_t foreground = {0xffff, 0xffff, 0xffff, 0xffff}; /* White */
const struct yml_node *font_node = yml_get_value(bar, "font");