From 8a493917c269572c14c220f5edfa185604fb7400 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Fri, 13 Sep 2019 00:39:41 -0700 Subject: [PATCH] config_get_mnemonic() is now used when getting the orientation option --- src/wofi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wofi.c b/src/wofi.c index 71f0a7d..8531ea7 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -391,7 +391,7 @@ void wofi_init(struct map* config) { y = strtol(config_get(config, "y", "-1"), NULL, 10); bool normal_window = strcmp(config_get(config, "normal_window", "false"), "true") == 0; mode = map_get(config, "mode"); - GtkOrientation orientation = strcmp(config_get(config, "orientation", "vertical"), "horizontal") == 0 ? GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL; + uint8_t orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "vertical", "horizontal"); uint8_t halign = config_get_mnemonic(config, "halign", "fill", 4, "fill", "start", "end", "center"); uint8_t valign = config_get_mnemonic(config, "valign", "start", 4, "fill", "start", "end", "center"); char* prompt = config_get(config, "prompt", mode);