From a6ac68c18fb3f644632a1c78dd48f49ad3c3be01 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 04 Oct 2017 23:15:35 -0400 Subject: mq_config_load(): Load from ${XDG_CONFIG_HOME}/${PACKAGE}/${profile} Where ${PACKAGE} is "marquee". --- (limited to 'src') diff --git a/src/config.c b/src/config.c index 9cb48b9..d28b939 100644 --- a/src/config.c +++ b/src/config.c @@ -19,6 +19,10 @@ * along with Marquee. If not, see . */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include @@ -204,8 +208,8 @@ mq_config_new(const gchar *profile) config = malloc(sizeof(*config)); config->profile = g_strdup(profile); - config->file_name = g_build_filename(g_get_user_config_dir(), profile, - "config", NULL); + config->file_name = g_build_filename(g_get_user_config_dir(), + PACKAGE, profile, "config", NULL); config->key_file = g_key_file_new(); config->types_and_cbs = g_hash_table_new(g_str_hash, g_int_equal); set_defaults(config); @@ -218,8 +222,8 @@ mq_config_load(MqConfig *config) { gchar *profile_dir; - profile_dir = g_build_filename(g_get_user_config_dir(), config->profile, - NULL); + profile_dir = g_build_filename(g_get_user_config_dir(), PACKAGE, + config->profile, NULL); g_mkdir_with_parents(profile_dir, 0700); g_free(profile_dir); -- cgit v0.9.1