gnome-games r7551 - in trunk/blackjack: . data src



Author: chpe
Date: Mon Mar 24 15:04:00 2008
New Revision: 7551
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7551&view=rev

Log:
	* data/blackjack.schemas.in: Use "" for the default theme.
	* src/blackjack.cpp: Use the default theme for empty pref string. Bug
	#513557.

Modified:
   trunk/blackjack/ChangeLog
   trunk/blackjack/data/blackjack.schemas.in
   trunk/blackjack/src/blackjack.cpp

Modified: trunk/blackjack/data/blackjack.schemas.in
==============================================================================
--- trunk/blackjack/data/blackjack.schemas.in	(original)
+++ trunk/blackjack/data/blackjack.schemas.in	Mon Mar 24 15:04:00 2008
@@ -30,7 +30,7 @@
       <applyto>/apps/blackjack/deck/card_style</applyto>
       <owner>blackjack</owner>
       <type>string</type>
-      <default>bonded.png</default>
+      <default></default>
       <locale name="C">
         <short>Theme file name</short>
         <long>The name of the file with the graphics for the cards.</long>

Modified: trunk/blackjack/src/blackjack.cpp
==============================================================================
--- trunk/blackjack/src/blackjack.cpp	(original)
+++ trunk/blackjack/src/blackjack.cpp	Mon Mar 24 15:04:00 2008
@@ -84,7 +84,6 @@
 gchar *game_variation = NULL;
 
 #define DEFAULT_VARIATION      "Vegas_Strip.rules"
-#define DEFAULT_THEME "bonded"
 
 void
 bj_make_window_title (gchar *game_name) 
@@ -519,14 +518,19 @@
 {
         gchar *lcard_style;
 
-        lcard_style = games_conf_get_string_with_default (KEY_DECK_GROUP,
-                                                          KEY_CARD_STYLE,
-                                                          DEFAULT_THEME);
+        lcard_style = games_conf_get_string (KEY_DECK_GROUP, KEY_CARD_STYLE, NULL);
+        if (!lcard_style || !lcard_style[0]) {
+                g_free (lcard_style);
+                lcard_style = g_strdup (GAMES_CARD_THEME_DEFAULT);
+        }
+
+#ifdef HAVE_GNOME
         /* Back compat */
         if (g_str_has_suffix (lcard_style, ".svg"))
                 *g_strrstr (lcard_style, ".svg") = '\0';
         else if (g_str_has_suffix (lcard_style, ".png"))
                 *g_strrstr (lcard_style, ".png") = '\0';
+#endif /* HAVE_GNOME */
 
         return lcard_style;
 }



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