[gnome-games/applygsoc2009: 17/76] Use gconf to decide which new game to open
- From: Pablo Castellano <pablog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/applygsoc2009: 17/76] Use gconf to decide which new game to open
- Date: Mon, 6 Sep 2010 02:48:39 +0000 (UTC)
commit 5550b26d4b92b9feebe754759544fdb6d68d7dc9
Author: Pablo Castellano <pablog src gnome org>
Date: Thu Aug 26 04:52:34 2010 +0200
Use gconf to decide which new game to open
Next step would be to add GUI for the option
gnome-sudoku/src/lib/main.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 42bbc22..07492c7 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -96,6 +96,7 @@ class UI (gconf_wrapper.GConfWrapper):
initial_prefs = {'group_size':9,
'always_show_hints':False,
'difficulty':0.0,
+ 'game-level': 'easy',
'minimum_number_of_new_puzzles':MIN_NEW_PUZZLES,
'highlight':False,
'bg_color':'black',
@@ -155,7 +156,7 @@ class UI (gconf_wrapper.GConfWrapper):
def _auto_load_new(self):
"""Automatically open a new game"""
# TODO should use preconfigured level
- new_puzzle = self.sudoku_maker.get_puzzles(1, ['easy'])
+ new_puzzle = self.sudoku_maker.get_puzzles(1, [self.gconf['game-level']])
if new_puzzle:
# get_puzzles returns a list of (<puzzle>, <difficulty>)
self._game = self.sudoku_maker.get_puzzles(1, ['easy'])[0][0]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]