From 677c43ea6040bebf49dec5df241a50e022236de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 1 Dec 2019 19:29:36 +0100 Subject: [PATCH] config: font_from_name() no longer accepts a tllist --- config.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/config.c b/config.c index 23cc39c..fb8e6b7 100644 --- a/config.c +++ b/config.c @@ -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");