summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerberos <[email protected]>2012-01-30 13:26:01 -0300
committerPerberos <[email protected]>2012-01-30 13:26:01 -0300
commit98403dcdc65f055f047b99902f119a4fb5a4c40c (patch)
tree08a85a271aedf18771dba92be03fcf347d93e55d
parente46f0dc223ebda66c34d4059c8e4207c5dd748e2 (diff)
downloadeom-98403dcdc65f055f047b99902f119a4fb5a4c40c.tar.bz2
eom-98403dcdc65f055f047b99902f119a4fb5a4c40c.tar.xz
g_get_user_config_dir() would be better (https://github.com/mate-desktop/mate-panel/issues/8)
-rw-r--r--src/eom-application.c18
-rw-r--r--src/eom-util.c9
2 files changed, 15 insertions, 12 deletions
diff --git a/src/eom-application.c b/src/eom-application.c
index 2da184d..afa1683 100644
--- a/src/eom-application.c
+++ b/src/eom-application.c
@@ -543,10 +543,11 @@ eom_application_screensaver_disable (EomApplication *application)
static void
eom_application_load_accelerators (void)
{
- gchar *accelfile = g_build_filename (g_get_home_dir (),
- ".mate2",
- "accels",
- "eom", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ gchar* accelfile = g_build_filename(g_get_user_config_dir(), ".mate", "accels", "eom", NULL);
+ #else // glib version < 2.6.0
+ gchar* accelfile = g_build_filename(g_get_home_dir(), ".config", ".mate", "accels", "eom", NULL);
+ #endif
/* gtk_accel_map_load does nothing if the file does not exist */
gtk_accel_map_load (accelfile);
@@ -556,10 +557,11 @@ eom_application_load_accelerators (void)
static void
eom_application_save_accelerators (void)
{
- gchar *accelfile = g_build_filename (g_get_home_dir (),
- ".mate2",
- "accels",
- "eom", NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ gchar* accelfile = g_build_filename(g_get_user_config_dir(), ".mate", "accels", "eom", NULL);
+ #else // glib version < 2.6.0
+ gchar* accelfile = g_build_filename(g_get_home_dir(), ".config", ".mate", "accels", "eom", NULL);
+ #endif
gtk_accel_map_save (accelfile);
g_free (accelfile);
diff --git a/src/eom-util.c b/src/eom-util.c
index 2d74305..08cb573 100644
--- a/src/eom-util.c
+++ b/src/eom-util.c
@@ -254,10 +254,11 @@ eom_util_dot_dir (void)
if (dot_dir == NULL) {
gboolean exists;
- dot_dir = g_build_filename (g_get_home_dir (),
- ".mate2",
- "eom",
- NULL);
+ #if GLIB_CHECK_VERSION(2, 6, 0)
+ dot_dir = g_build_filename(g_get_user_config_dir(), ".mate", "eom", NULL);
+ #else // glib version < 2.6.0
+ dot_dir = g_build_filename(g_get_home_dir(), ".config", ".mate", "eom", NULL);
+ #endif
exists = ensure_dir_exists (dot_dir);