GConf to GSettings port

This commit is contained in:
Emil Dudev
2013-12-26 17:53:36 +02:00
committed by Daniel Narvaez
parent 93437ddedf
commit db2ba3e579
7 changed files with 52 additions and 43 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ import logging
from gi.repository import Gdk
from gi.repository import Pango
from gi.repository import GConf
from gi.repository import Gio
FOCUS_LINE_WIDTH = 2
@@ -115,9 +115,9 @@ MEDIUM_ICON_SIZE = zoom(55 * 1.5)
LARGE_ICON_SIZE = zoom(55 * 2.0)
XLARGE_ICON_SIZE = zoom(55 * 2.75)
client = GConf.Client.get_default()
FONT_SIZE = client.get_float('/desktop/sugar/font/default_size')
FONT_FACE = client.get_string('/desktop/sugar/font/default_face')
settings = Gio.Settings('org.sugarlabs.font')
FONT_SIZE = settings.get_double('default-size')
FONT_FACE = settings.get_string('default-face')
FONT_NORMAL = Font('%s %f' % (FONT_FACE, FONT_SIZE))
FONT_BOLD = Font('%s bold %f' % (FONT_FACE, FONT_SIZE))
+3 -3
View File
@@ -22,7 +22,7 @@ STABLE.
import random
import logging
from gi.repository import GConf
from gi.repository import Gio
colors = [['#B20008', '#FF2B34'],
['#FF2B34', '#B20008'],
@@ -229,8 +229,8 @@ class XoColor:
parsed_color = None
if color_string is None:
client = GConf.Client.get_default()
color_string = client.get_string('/desktop/sugar/user/color')
settings = Gio.Settings('org.sugarlabs.user')
color_string = settings.get_string('color')
if color_string is not None:
parsed_color = _parse_string(color_string)