[gnome-games] Remove unused gtk accel map code



commit ef3c4c2143a451b3b7f4953fa20adaa6362ae8e7
Author: William Jon McCann <jmccann redhat com>
Date:   Fri May 11 12:00:45 2012 -0400

    Remove unused gtk accel map code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675894

 libgames-support/games-settings.c |   85 -------------------------------------
 1 files changed, 0 insertions(+), 85 deletions(-)
---
diff --git a/libgames-support/games-settings.c b/libgames-support/games-settings.c
index a232190..4a7fb9c 100644
--- a/libgames-support/games-settings.c
+++ b/libgames-support/games-settings.c
@@ -84,91 +84,6 @@ window_state_event_cb (GtkWidget *widget,
   return FALSE;
 }
 
-#if 0
-
-#define ACCELMAP_EXT "accels"
-
-static char *
-games_conf_get_accel_map_path (GamesConf *conf,
-                               gboolean ensure_dir_exists)
-{
-  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
-  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
-  if (!conf_dir)
-    goto loser;
-
-  /* Mode 0700 per the XDG basedir spec */
-  if (ensure_dir_exists &&
-      g_mkdir_with_parents (conf_dir, 0700) < 0) {
-    int err = errno;
-
-    if (err != EEXIST) {
-      g_warning ("Failed to create config directory \"%s\": %s\n", conf_dir, g_strerror (err));
-      goto loser;
-    }
-  }
-
-#ifdef HAVE_GNOME
-  conf_file = g_build_filename (conf_dir, game_name, NULL);
-#else
-{
-  char *accelmap_filename;
-
-  accelmap_filename = g_strdup_printf ("%s.%s", game_name, ACCELMAP_EXT);
-  conf_file = g_build_filename (conf_dir, accelmap_filename, NULL);
-  g_free (accelmap_filename);
-}
-#endif
-
-loser:
-  g_free (conf_dir);
-  g_free (game_name);
-
-  return conf_file;
-}
-
-static void
-games_conf_load_accel_map (GamesConf *conf)
-{
-  char *conf_file;
-
-  conf_file = games_conf_get_accel_map_path (conf, FALSE);
-  if (!conf_file)
-    return;
-
-  gtk_accel_map_load (conf_file);
-  g_free (conf_file);
-}
-
-static void
-games_conf_save_accel_map (GamesConf *conf)
-{
-  char *conf_file;
-
-  conf_file = games_conf_get_accel_map_path (conf, TRUE);
-  if (!conf_file)
-    return;
-
-  gtk_accel_map_save (conf_file);
-  g_free (conf_file);
-}
-
-#endif /* 0 */
-
 typedef struct {
   guint keyval;
   GdkModifierType modifiers;



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