[gnome-games] Consolodate bg_black and bg_custom_color keys



commit 0f583614cd457e01765ef9e4faf9d8f3d2122ac3
Author: Robert Ancell <robert ancell gmail com>
Date:   Fri Jul 10 07:23:32 2009 +1000

    Consolodate bg_black and bg_custom_color keys

 gnome-sudoku/data/gnome-sudoku.schemas.in |   14 +++-----------
 gnome-sudoku/src/lib/main.py              |   12 +++---------
 2 files changed, 6 insertions(+), 20 deletions(-)
---
diff --git a/gnome-sudoku/data/gnome-sudoku.schemas.in b/gnome-sudoku/data/gnome-sudoku.schemas.in
index d574070..22f0f36 100644
--- a/gnome-sudoku/data/gnome-sudoku.schemas.in
+++ b/gnome-sudoku/data/gnome-sudoku.schemas.in
@@ -170,11 +170,11 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnome-sudoku/bg_custom_color</key>
-      <applyto>/apps/gnome-sudoku/bg_custom_color</applyto>
+      <key>/schemas/apps/gnome-sudoku/bg_color</key>
+      <applyto>/apps/gnome-sudoku/bg_color</applyto>
       <owner>gnome-sudoku</owner>
       <type>string</type>
-      <default></default>
+      <default>black</default>
     </schema>
 
     <schema>
@@ -194,14 +194,6 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnome-sudoku/bg_black</key>
-      <applyto>/apps/gnome-sudoku/bg_black</applyto>
-      <owner>gnome-sudoku</owner>
-      <type>bool</type>
-      <default>TRUE</default>
-    </schema>
-
-    <schema>
       <key>/schemas/apps/gnome-sudoku/always_show_hints</key>
       <applyto>/apps/gnome-sudoku/always_show_hints</applyto>
       <owner>gnome-sudoku</owner>
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 727e54d..165da23 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -145,8 +145,7 @@ class UI (gconf_wrapper.GConfWrapper):
                      'difficulty':0.0,
                      'minimum_number_of_new_puzzles':MIN_NEW_PUZZLES,
                      'highlight':False,
-                     'bg_black':True,
-                     'bg_custom_color':'',
+                     'bg_color':'black',
                      'show_tracker':False,
                      'width': 700,
                      'height': 675,
@@ -334,13 +333,8 @@ class UI (gconf_wrapper.GConfWrapper):
 
     def setup_color (self):
         # setup background colors
-        if self.gconf['bg_custom_color']:
-            bgcol = self.gconf['bg_custom_color']
-        elif self.gconf['bg_black']:
-            bgcol = 'black'
-        else:
-            bgcol = None
-        if bgcol:
+        bgcol = self.gconf['bg_color']
+        if bgcol != '':
             self.gsd.set_bg_color(bgcol)
 
     def setup_autosave (self):



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