summaryrefslogtreecommitdiff
path: root/shell/ev-application.c
diff options
context:
space:
mode:
authorPerberos <[email protected]>2012-01-30 13:30:08 -0300
committerPerberos <[email protected]>2012-01-30 13:30:08 -0300
commit7a506b7325e98150fe1b1e1ac8b1d51050f1ad71 (patch)
tree5f96290fdc79b8c731ccf403fea3adaa91654266 /shell/ev-application.c
parent73be26c77e98c4f6c19b040230b83b8144d0a70b (diff)
downloadatril-7a506b7325e98150fe1b1e1ac8b1d51050f1ad71.tar.bz2
atril-7a506b7325e98150fe1b1e1ac8b1d51050f1ad71.tar.xz
g_get_user_config_dir() would be better (https://github.com/mate-desktop/mate-panel/issues/8)
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r--shell/ev-application.c18
1 files changed, 15 insertions, 3 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