[gnome-games] sudoku: port the gconf wrapper
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] sudoku: port the gconf wrapper
- Date: Mon, 4 Apr 2011 21:48:23 +0000 (UTC)
commit cce4639e961f5b297ca23139c09772036cbd7fcc
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date: Mon Apr 4 23:44:43 2011 +0200
sudoku: port the gconf wrapper
gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py b/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py
index ef7cd7b..fba2122 100644
--- a/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py
+++ b/gnome-sudoku/src/lib/gtk_goodies/gconf_wrapper.py
@@ -4,7 +4,6 @@
# by Johan Dahlin
from gi.repository import GConf
-from gconf import VALUE_BOOL, VALUE_INT, VALUE_STRING, VALUE_FLOAT
from types import StringType, IntType, FloatType, BooleanType
verbose = False
@@ -17,7 +16,7 @@ class GConfWrap:
def __init__ (self, appname, allowed={}):
self._domain = '/apps/%s/' % appname
self._allowed = allowed
- self._gconf_client = GConf.Client.get_default ()
+ self._gconf_client = GConf.Client.get_default()
def __getitem__ (self, attr):
return self.get_value (attr)
@@ -66,13 +65,13 @@ class GConfWrap:
if value == None:
raise GConfError("gconf_client returned a None!")
ValueType = value.type
- if ValueType == VALUE_BOOL:
+ if ValueType == GConf.ValueType.BOOL:
return value.get_bool ()
- elif ValueType == VALUE_INT:
+ elif ValueType == GConf.ValueType.INT:
return value.get_int ()
- elif ValueType == VALUE_STRING:
+ elif ValueType == GConf.ValueType.STRING:
return value.get_string ()
- elif ValueType == VALUE_FLOAT:
+ elif ValueType == GConf.ValueType.FLOAT:
return value.get_float ()
def set_value (self, key, value):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]