summaryrefslogtreecommitdiff
path: root/capplets/appearance/mate-wp-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/appearance/mate-wp-xml.c')
-rw-r--r--capplets/appearance/mate-wp-xml.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/capplets/appearance/mate-wp-xml.c b/capplets/appearance/mate-wp-xml.c
index c7d7867d..3a0f22a6 100644
--- a/capplets/appearance/mate-wp-xml.c
+++ b/capplets/appearance/mate-wp-xml.c
@@ -409,7 +409,11 @@ void mate_wp_xml_load_list(AppearanceData* data)
char* wpdbfile;
gint i;
- wpdbfile = g_build_filename(g_get_home_dir(), ".config", "mate", "backgrounds.xml", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ wpdbfile = g_build_filename(g_get_user_config_dir(), "mate", "backgrounds.xml", NULL);
+ #else // glib version < 2.6.0
+ wpdbfile = g_build_filename(g_get_home_dir(), ".config", "mate", "backgrounds.xml", NULL);
+ #endif
if (g_file_test(wpdbfile, G_FILE_TEST_EXISTS))
{
@@ -419,7 +423,11 @@ void mate_wp_xml_load_list(AppearanceData* data)
{
g_free (wpdbfile);
- wpdbfile = g_build_filename(g_get_home_dir(), ".config", "mate", "wp-list.xml", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ wpdbfile = g_build_filename(g_get_user_config_dir(), "mate", "wp-list.xml", NULL);
+ #else // glib version < 2.6.0
+ wpdbfile = g_build_filename(g_get_home_dir(), ".config", "mate", "wp-list.xml", NULL);
+ #endif
if (g_file_test(wpdbfile, G_FILE_TEST_EXISTS))
{
@@ -492,7 +500,11 @@ void mate_wp_xml_save_list(AppearanceData* data)
g_hash_table_destroy(data->wp_hash);
list = g_slist_reverse(list);
- wpfile = g_build_filename(g_get_home_dir (), ".config", "mate", "backgrounds.xml", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ wpfile = g_build_filename(g_get_user_config_dir(), "mate", "backgrounds.xml", NULL);
+ #else // glib version < 2.6.0
+ wpfile = g_build_filename(g_get_home_dir(), ".config", "mate", "backgrounds.xml", NULL);
+ #endif
xmlKeepBlanksDefault(0);