diff options
author | James Booth <boothj5@gmail.com> | 2012-05-10 03:37:24 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-05-10 03:37:24 +0100 |
commit | 57ad207dee87f8fe811b3ae465e3e0696412b930 (patch) | |
tree | 4332cd92b279cd7772834b81983e973157846f30 | |
parent | 6d5d41b33ae5febc74086bd8f1fd0b67fbd91d40 (diff) | |
download | profani-tty-57ad207dee87f8fe811b3ae465e3e0696412b930.tar.gz |
Look up .profanity in home
-rw-r--r-- | preferences.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/preferences.c b/preferences.c index f5e5284a..96ba7b8e 100644 --- a/preferences.c +++ b/preferences.c @@ -20,15 +20,18 @@ * */ +#include <stdlib.h> #include <glib.h> #include "windows.h" void prefs_load(void) { - GKeyFile *g_prefs = g_key_file_new(); + GString *prefs_loc = g_string_new(getenv("HOME")); + g_string_append(prefs_loc, "/.profanity"); - g_key_file_load_from_file(g_prefs, "/home/james/.profanity", + GKeyFile *g_prefs = g_key_file_new(); + g_key_file_load_from_file(g_prefs, prefs_loc->str, G_KEY_FILE_NONE, NULL); gboolean beep = g_key_file_get_boolean(g_prefs, "settings", "beep", NULL); |