[eog] Place configuration files into an XDG standard config folder



commit ad1bb602f3a922681da5b9d6ae9f9cc75c8dc0ff
Author: Sebastian Geiger <sbastig invisco de>
Date:   Sat Aug 21 12:11:30 2010 +0200

    Place configuration files into an XDG standard config folder
    
    Just replaces the paths for now. Part of bug 522806.

 src/eog-application.c |   14 ++++++--------
 src/eog-util.c        |    3 +--
 2 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/src/eog-application.c b/src/eog-application.c
index d2074c8..9dce772 100644
--- a/src/eog-application.c
+++ b/src/eog-application.c
@@ -543,11 +543,9 @@ eog_application_screensaver_disable (EogApplication *application)
 static void
 eog_application_load_accelerators (void)
 {
-	gchar *accelfile = g_build_filename (g_get_home_dir (),
-					     ".gnome2",
-					     "accels",
+	gchar *accelfile = g_build_filename (g_get_user_cache_dir (),
+                        "eog",
 					     "eog", NULL);
-
 	/* gtk_accel_map_load does nothing if the file does not exist */
 	gtk_accel_map_load (accelfile);
 	g_free (accelfile);
@@ -556,11 +554,11 @@ eog_application_load_accelerators (void)
 static void
 eog_application_save_accelerators (void)
 {
-	gchar *accelfile = g_build_filename (g_get_home_dir (),
-					     ".gnome2",
-					     "accels",
+	gchar *path = g_build_filename(g_get_user_cache_dir (), "eog");
+    if(!g_file_test(path, G_FILE_TEST_IS_DIR))
+ 	   g_mkdir(path, 0700);
+    gchar *accelfile = g_build_filename (path,
 					     "eog", NULL);
-
 	gtk_accel_map_save (accelfile);
 	g_free (accelfile);
 }
diff --git a/src/eog-util.c b/src/eog-util.c
index 642aabf..9e72c9d 100644
--- a/src/eog-util.c
+++ b/src/eog-util.c
@@ -254,8 +254,7 @@ eog_util_dot_dir (void)
 	if (dot_dir == NULL) {
 		gboolean exists;
 
-		dot_dir = g_build_filename (g_get_home_dir (),
-					    ".gnome2",
+		dot_dir = g_build_filename (g_get_user_config_dir (),
 					    "eog",
 					    NULL);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]