summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ev-application.c18
-rw-r--r--shell/ev-daemon.c9
2 files changed, 20 insertions, 7 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c
index a5a67f22..1e762b6f 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -862,7 +862,11 @@ static void ev_application_accel_map_save(EvApplication* application)
}
else
{
- accel_map_file = g_build_filename(g_get_home_dir(), ".config", "accels", "atril", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ accel_map_file = g_build_filename(g_get_user_config_dir(), "accels", "atril", NULL);
+ #else // glib version < 2.6.0
+ accel_map_file = g_build_filename(g_get_home_dir(), ".config", "accels", "atril", NULL);
+ #endif
}
tmp_filename = g_strdup_printf("%s.XXXXXX", accel_map_file);
@@ -900,7 +904,11 @@ static void ev_application_accel_map_load(EvApplication* application)
}
else
{
- accel_map_file = g_build_filename(g_get_home_dir(), ".config", "accels", "atril", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ accel_map_file = g_build_filename(g_get_user_config_dir(), "accels", "atril", NULL);
+ #else // glib version < 2.6.0
+ accel_map_file = g_build_filename(g_get_home_dir(), ".config", "accels", "atril", NULL);
+ #endif
}
gtk_accel_map_load(accel_map_file);
@@ -976,7 +984,11 @@ static void ev_application_init(EvApplication* ev_application)
}
else
{
- ev_application->dot_dir = g_build_filename(g_get_home_dir(), ".config", "atril", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ ev_application->dot_dir = g_build_filename(g_get_user_config_dir(), "atril", NULL);
+ #else // glib version < 2.6.0
+ ev_application->dot_dir = g_build_filename(g_get_home_dir(), ".config", "atril", NULL);
+ #endif
}
#ifdef G_OS_WIN32
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c
index 49d9f1a2..e9c2f0ae 100644
--- a/shell/ev-daemon.c
+++ b/shell/ev-daemon.c
@@ -178,10 +178,11 @@ ev_migrate_metadata (void)
if (userdir) {
dot_dir = g_build_filename (userdir, "atril", NULL);
} else {
- dot_dir = g_build_filename (g_get_home_dir (),
- ".config",
- "atril",
- NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ dot_dir = g_build_filename(g_get_user_config_dir(), "atril", NULL);
+ #else // glib version < 2.6.0
+ dot_dir = g_build_filename(g_get_home_dir(), ".config", "atril", NULL);
+ #endif
}
updated = g_build_filename (dot_dir, "migrated-to-gvfs", NULL);