summaryrefslogtreecommitdiff
path: root/pango/pango-utils.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-05-10 19:54:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2012-05-22 22:57:52 -0400
commit926aa9bca4e9b50dcf563318f8eb40a260c90f1f (patch)
treed70acf8acc7b1e569b5e04cb50aa336b9678d1e1 /pango/pango-utils.c
parent216d03ba5023b247515e2adf5df658c0e4e90b3d (diff)
downloadpango-926aa9bca4e9b50dcf563318f8eb40a260c90f1f.tar.gz
Read pangorc from XDG_CONFIG_HOME
Look for the rcfile in $XDG_CONFIG_HOME/pango/pangorc instead of ~/.pangorc. https://bugzilla.gnome.org/show_bug.cgi?id=675400
Diffstat (limited to 'pango/pango-utils.c')
-rw-r--r--pango/pango-utils.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 8177dab2..c68e2d48 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -631,7 +631,6 @@ static void
read_config (void)
{
char *filename;
- const char *home;
const char *envvar;
read_config_system ();
@@ -639,18 +638,14 @@ read_config (void)
if (!did_read_user_config)
{
did_read_user_config = TRUE;
-
- home = g_get_home_dir ();
- if (home && *home)
- {
- filename = g_build_filename (home, ".pangorc", NULL);
- read_config_file (filename, FALSE);
- g_free (filename);
- }
+
+ filename = g_build_filename (g_get_user_config_dir (), "pango", "pangorc", NULL);
+ read_config_file (filename, FALSE);
+ g_free (filename);
envvar = g_getenv ("PANGO_RC_FILE");
if (envvar)
- read_config_file (envvar, TRUE);
+ read_config_file (envvar, TRUE);
}
}
@@ -680,7 +675,7 @@ pango_config_key_get_system (const char *key)
*
* Looks up a key in the Pango config database
* (pseudo-win.ini style, read from $sysconfdir/pango/pangorc,
- * ~/.pangorc, and getenv (PANGO_RC_FILE).)
+ * $XDG_CONFIG_HOME/pango/pangorc, and getenv (PANGO_RC_FILE).)
*
* Return value: the value, if found, otherwise %NULL. The value is a
* newly-allocated string and must be freed with g_free().