gnome-games r8431 - trunk/libgames-support



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

Log:
Fix the card theme path loading for the preimage derived card theme
classes.

Modified:
   trunk/libgames-support/games-card-theme-kde.c
   trunk/libgames-support/games-card-theme-preimage.c
   trunk/libgames-support/games-card-theme-sliced.c
   trunk/libgames-support/games-card-theme-svg.c

Modified: trunk/libgames-support/games-card-theme-kde.c
==============================================================================
--- trunk/libgames-support/games-card-theme-kde.c	(original)
+++ trunk/libgames-support/games-card-theme-kde.c	Tue Jan  6 18:18:31 2009
@@ -192,8 +192,10 @@
   _games_card_theme_class_append_theme_info_foreach_env
     (klass, "GAMES_CARD_THEME_PATH_KDE", list);
 
+#if 0
   _games_card_theme_class_append_theme_info_foreach
     (klass, games_runtime_get_directory (GAMES_RUNTIME_SCALABLE_CARDS_DIRECTORY), list);
+#endif
 }
 
 static void

Modified: trunk/libgames-support/games-card-theme-preimage.c
==============================================================================
--- trunk/libgames-support/games-card-theme-preimage.c	(original)
+++ trunk/libgames-support/games-card-theme-preimage.c	Tue Jan  6 18:18:31 2009
@@ -281,18 +281,6 @@
   return info;
 }
 
-// FIXMEchpe move this to derived classes
-static void
-games_card_theme_preimage_class_get_theme_infos (GamesCardThemeClass *klass,
-                                                 GList **list)
-{
-  _games_card_theme_class_append_theme_info_foreach_env
-    (klass, "GAMES_CARD_THEME_PATH_PREIMAGE", list);
-
-  _games_card_theme_class_append_theme_info_foreach
-    (klass, games_runtime_get_directory (GAMES_RUNTIME_SCALABLE_CARDS_DIRECTORY), list);
-}
-
 static void
 games_card_theme_preimage_class_init (GamesCardThemePreimageClass * klass)
 {
@@ -302,7 +290,6 @@
   gobject_class->finalize = games_card_theme_preimage_finalize;
 
   theme_class->get_theme_info = games_card_theme_preimage_class_get_theme_info;
-  theme_class->get_theme_infos = games_card_theme_preimage_class_get_theme_infos;
 
   theme_class->load = games_card_theme_preimage_load;
   theme_class->set_card_size = games_card_theme_preimage_set_card_size;

Modified: trunk/libgames-support/games-card-theme-sliced.c
==============================================================================
--- trunk/libgames-support/games-card-theme-sliced.c	(original)
+++ trunk/libgames-support/games-card-theme-sliced.c	Tue Jan  6 18:18:31 2009
@@ -207,11 +207,27 @@
 }
 
 static void
+games_card_theme_sliced_class_get_theme_infos (GamesCardThemeClass *klass,
+                                               GList **list)
+{
+  _games_card_theme_class_append_theme_info_foreach_env
+    (klass, "GAMES_CARD_THEME_PATH_SLICED", list);
+
+  // FIXMEchpe find the old theme path
+#if 0
+  _games_card_theme_class_append_theme_info_foreach
+    (klass, games_runtime_get_directory (GAMES_RUNTIME_SCALABLE_CARDS_DIRECTORY), list);
+#endif
+}
+
+static void
 games_card_theme_sliced_class_init (GamesCardThemeSlicedClass * klass)
 {
   GamesCardThemeClass *theme_class = GAMES_CARD_THEME_CLASS (klass);
   GamesCardThemePreimageClass *preimage_theme_class = GAMES_CARD_THEME_PREIMAGE_CLASS (klass);
 
+  theme_class->get_theme_infos = games_card_theme_sliced_class_get_theme_infos;
+
   theme_class->load = games_card_theme_sliced_load;
   theme_class->get_card_pixbuf = games_card_theme_sliced_get_card_pixbuf;
 

Modified: trunk/libgames-support/games-card-theme-svg.c
==============================================================================
--- trunk/libgames-support/games-card-theme-svg.c	(original)
+++ trunk/libgames-support/games-card-theme-svg.c	Tue Jan  6 18:18:31 2009
@@ -147,10 +147,23 @@
 }
 
 static void
+games_card_theme_svg_class_get_theme_infos (GamesCardThemeClass *klass,
+                                            GList **list)
+{
+  _games_card_theme_class_append_theme_info_foreach_env
+    (klass, "GAMES_CARD_THEME_PATH_SVG", list);
+
+  _games_card_theme_class_append_theme_info_foreach
+    (klass, games_runtime_get_directory (GAMES_RUNTIME_SCALABLE_CARDS_DIRECTORY), list);
+}
+
+static void
 games_card_theme_svg_class_init (GamesCardThemeSVGClass * klass)
 {
   GamesCardThemeClass *theme_class = GAMES_CARD_THEME_CLASS (klass);
 
+  theme_class->get_theme_infos = games_card_theme_svg_class_get_theme_infos;
+
   theme_class->load = games_card_theme_svg_load;
   theme_class->get_card_pixbuf = games_card_theme_svg_get_card_pixbuf;
 }



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