[gnome-games/gnome-2-30] gnome-games doesn't support relocatable .gnome2 directory (Bug 613634)
- From: Jason Clinton <jclinton src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/gnome-2-30] gnome-games doesn't support relocatable .gnome2 directory (Bug 613634)
- Date: Sat, 10 Apr 2010 05:00:57 +0000 (UTC)
commit c706856fb9b90e71494ced2898d269dbfc7ed7c3
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 aa367ed..1a2fb84 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]