[gnome-games] Use boolean type for gconf keys
- From: Robert Ancell <rancell src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] Use boolean type for gconf keys
- Date: Thu, 9 Jul 2009 21:17:04 +0000 (UTC)
commit 5f70fd2d05498ccae17d9a5004c5548c53df28f5
Author: Robert Ancell <robert ancell gmail com>
Date: Fri Jul 10 07:16:55 2009 +1000
Use boolean type for gconf keys
gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py | 2 +-
gnome-sudoku/src/lib/main.py | 6 +++---
gnome-sudoku/src/lib/sudoku_generator_gui.py | 12 ++++++------
3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py b/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py
index 6206968..8db134e 100644
--- a/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py
+++ b/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py
@@ -178,7 +178,7 @@ class GConfWrapper:
def gconf_wrap_toggle (self, key_name, action):
self.gconf_wrap(key_name,action,
- get_method=lambda w: int(w.get_active()),
+ get_method=lambda w: w.get_active(),
set_method=lambda w,v: w.set_active(v),
signal='toggled')
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 2ae378a..727e54d 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -140,12 +140,12 @@ class UI (gconf_wrapper.GConfWrapper):
</ui>'''
initial_prefs = {'group_size':9,
- 'always_show_hints':0,
+ 'always_show_hints':False,
'player':os.environ.get('USERNAME', ''),
'difficulty':0.0,
'minimum_number_of_new_puzzles':MIN_NEW_PUZZLES,
- 'highlight':0,
- 'bg_black':1,
+ 'highlight':False,
+ 'bg_black':True,
'bg_custom_color':'',
'show_tracker':False,
'width': 700,
diff --git a/gnome-sudoku/src/lib/sudoku_generator_gui.py b/gnome-sudoku/src/lib/sudoku_generator_gui.py
index 6c72046..f336898 100644
--- a/gnome-sudoku/src/lib/sudoku_generator_gui.py
+++ b/gnome-sudoku/src/lib/sudoku_generator_gui.py
@@ -11,12 +11,12 @@ class GameGenerator (gconf_wrapper.GConfWrapper):
ui_file = os.path.join(defaults.UI_DIR, 'puzzle_generator.ui')
- initial_prefs = {'generate_target_easy':1,
- 'generate_target_medium':0,
- 'generate_target_hard':1,
- 'generate_target_veryHard':1,
- 'generate_endlessly':1,
- 'generate_for_target':0,
+ initial_prefs = {'generate_target_easy':True,
+ 'generate_target_medium':False,
+ 'generate_target_hard':True,
+ 'generate_target_veryHard':True,
+ 'generate_endlessly':True,
+ 'generate_for_target':False,
'number_of_sudokus_to_generate':10,
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]