From 00702a3b764139a28b4de89f48ec1e38f1c58150 Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Wed, 30 Oct 2019 19:11:16 +0100 Subject: Improve configuration handling This commit improves and simplifies weltschmerz's configuration handling. Obtaining and parsing the KeyFile is split out into ConfigReader, which is fully agnostic of the specific configuration values. Config now contains all configuration values in the form of primitive types or class instances, and no longer delegates access to the KeyFile structure directly. This means that the configuration file is read once, and then kept in the Config instance. Indirectly this commit also fixes a bug where weltschmerz would segfault if one of the palette entries contained an invalid value. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ad973c7..5822595 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ VALAC ?= valac weltschmerz: weltschmerz.vala terminal.vala config.vala resources.c ${VALAC} -X -lm --pkg posix --pkg gtk+-3.0 --pkg vte-2.91 --gresources resources.xml \ - weltschmerz.vala terminal.vala config.vala resources.c + weltschmerz.vala terminal.vala config.vala configreader.vala resources.c resources.c: resources.xml terminal.ui terminal.css glib-compile-resources $< --target=$@ --generate-source -- cgit v1.2.3-2-gb3c3