summaryrefslogtreecommitdiff
path: root/pango/pango-utils.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2012-08-28 00:19:35 -0400
committerBehdad Esfahbod <behdad@behdad.org>2012-08-28 00:19:35 -0400
commitab76ef1c6b55f6bf0cbff4ac5a5262f117bbe800 (patch)
treeb0c66f3efa264ea9d9b3209ee3b1fe7028f2c9ce /pango/pango-utils.c
parent4105e20d799a80f9c0c2befdef8f458ee11654a6 (diff)
downloadpango-ab76ef1c6b55f6bf0cbff4ac5a5262f117bbe800.tar.gz
Start cleaning up config reading
Diffstat (limited to 'pango/pango-utils.c')
-rw-r--r--pango/pango-utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 0d138efc..4aed1c4f 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -525,7 +525,7 @@ static GHashTable *config_hash = NULL;
static gboolean did_read_user_config = FALSE;
static void
-read_config_file (const char *filename, gboolean enoent_error)
+read_config_file (const char *filename, gboolean enoent_error, GHashTable *ht)
{
GKeyFile *key_file = g_key_file_new();
GError *key_file_error = NULL;
@@ -569,7 +569,7 @@ read_config_file (const char *filename, gboolean enoent_error)
gchar *value = g_key_file_get_value(key_file, group, key, &key_error);
if (value != NULL)
{
- g_hash_table_insert (config_hash,
+ g_hash_table_insert (ht,
g_strdup_printf ("%s/%s", group, key),
value);
}
@@ -613,7 +613,7 @@ read_config_system (void)
filename = g_build_filename (pango_get_sysconf_subdirectory (),
"pangorc",
NULL);
- read_config_file (filename, FALSE);
+ read_config_file (filename, FALSE, config_hash);
g_free (filename);
}
@@ -630,12 +630,12 @@ read_config (void)
did_read_user_config = TRUE;
filename = g_build_filename (g_get_user_config_dir (), "pango", "pangorc", NULL);
- read_config_file (filename, FALSE);
+ read_config_file (filename, FALSE, config_hash);
g_free (filename);
envvar = g_getenv ("PANGO_RC_FILE");
if (envvar)
- read_config_file (envvar, TRUE);
+ read_config_file (envvar, TRUE, config_hash);
}
}