[gnome-games] gnome-games doesn't support relocatable .gnome2 directory (Bug 613634)



commit 8b84e4396682f8c696fc92d8c15ac1d9eb0ea99b
Author: Ray Strode <rstrode redhat com>
Date:   Fri Apr 9 23:55:57 2010 -0500

    gnome-games doesn't support relocatable .gnome2 directory (Bug 613634)
    
    libgnome has an environment variable to support relocating the .gnome2
    directory.
    
    We (Red Hat) have a customer that wants to make use of this feature.
    
    gnome-games currently hard codes ~/.gnome2 instead of looking at the
    environment variable.

 libgames-support/games-conf.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libgames-support/games-conf.c b/libgames-support/games-conf.c
index a9c06e8..f365c8e 100644
--- a/libgames-support/games-conf.c
+++ b/libgames-support/games-conf.c
@@ -209,11 +209,16 @@ games_conf_get_accel_map_path (GamesConf *conf,
   GamesConfPrivate *priv = conf->priv;
   char *game_name, *conf_dir;
   char *conf_file = NULL;
+  const char *override;
 
   game_name = g_ascii_strdown (priv->game_name, -1);
 
 #ifdef HAVE_GNOME
-  conf_dir = g_build_filename (g_get_home_dir (), ".gnome2", "accels", NULL);
+  override = g_getenv ("GNOME22_USER_DIR");
+  if (override)
+    conf_dir = g_build_filename (override, "accels", NULL);
+  else
+    conf_dir = g_build_filename (g_get_home_dir (), ".gnome2", "accels", NULL);
 #else
   conf_dir = g_build_filename (g_get_user_config_dir (), "gnome-games", NULL);
 #endif



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