summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-04 23:15:35 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-04 23:18:29 (EDT)
commita6ac68c18fb3f644632a1c78dd48f49ad3c3be01 (patch)
tree6459ca4ad77392e7523934df0e0881d090798b53 /src
parent6208d1f813c2ea5a070d57aaa414fdd370391349 (diff)
downloadmarquee-a6ac68c18fb3f644632a1c78dd48f49ad3c3be01.zip
marquee-a6ac68c18fb3f644632a1c78dd48f49ad3c3be01.tar.gz
marquee-a6ac68c18fb3f644632a1c78dd48f49ad3c3be01.tar.bz2
mq_config_load(): Load from ${XDG_CONFIG_HOME}/${PACKAGE}/${profile}
Where ${PACKAGE} is "marquee".
Diffstat (limited to 'src')
-rw-r--r--src/config.c12
1 files changed, 8 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <string.h>
#include <stdlib.h>
@@ -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);