gnome-games r8500 - trunk/libgames-support



Author: chpe
Date: Tue Jan  6 18:20:35 2009
New Revision: 8500
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8500&view=rev

Log:
Ref the list elements when getting all theme infos.
Put the new info into the hash table in get_by_name.

Modified:
   trunk/libgames-support/games-card-themes.c

Modified: trunk/libgames-support/games-card-themes.c
==============================================================================
--- trunk/libgames-support/games-card-themes.c	(original)
+++ trunk/libgames-support/games-card-themes.c	Tue Jan  6 18:20:35 2009
@@ -335,10 +335,10 @@
 
 static void
 themes_foreach_add_to_list (gpointer key,
-                            gpointer data,
+                            GamesCardThemeInfo *theme_info,
                             GList **list)
 {
-  *list = g_list_prepend (*list, data);
+  *list = g_list_prepend (*list, games_card_theme_info_ref (theme_info));
 }
 
 typedef struct {
@@ -565,6 +565,9 @@
 
     games_card_themes_foreach_theme_dir (type, (GamesCardThemeForeachFunc) games_card_themes_try_theme_info_by_filename, &data);
     theme_info = data.theme_info;
+
+    if (theme_info)
+      g_hash_table_replace (theme_manager->theme_infos, theme_info->pref_name, theme_info);
   }
 
   g_free (filename);



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