gnome-games r7558 - branches/gnome-2-22/aisleriot



Author: chpe
Date: Sun Mar 30 23:50:36 2008
New Revision: 7558
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7558&view=rev

Log:
	* conf.c: (aisleriot_conf_get_statistic): Add back the statistics
	fallback to deal with bug #472542. Bug #525177.

Modified:
   branches/gnome-2-22/aisleriot/ChangeLog
   branches/gnome-2-22/aisleriot/conf.c

Modified: branches/gnome-2-22/aisleriot/conf.c
==============================================================================
--- branches/gnome-2-22/aisleriot/conf.c	(original)
+++ branches/gnome-2-22/aisleriot/conf.c	Sun Mar 30 23:50:36 2008
@@ -304,6 +304,17 @@
   AisleriotStatistic *game_stat;
 
   game_stat = g_hash_table_lookup (stats, game_file);
+  if (!game_stat) {
+    char *display_name;
+
+    /* Previous versions used the localised name as key, so try it as fall-back.
+     * See bug #406267 and bug #525177.
+     */
+    display_name = aisleriot_util_get_display_filename (game_file);
+    game_stat = g_hash_table_lookup (stats, display_name);
+    g_free (display_name);
+  }
+
   if (game_stat) {
     *statistic = *game_stat;
   } else {



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