From ba7550008cc9ba4ff5069ed72e3cbf637bb69bf8 Mon Sep 17 00:00:00 2001 From: iqraceme Date: Tue, 15 Jan 2019 00:35:21 +0500 Subject: [PATCH] Fixes #97 --- editfonts/globals.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editfonts/globals.py b/editfonts/globals.py index 76e1c97..90ddae0 100644 --- a/editfonts/globals.py +++ b/editfonts/globals.py @@ -6,6 +6,7 @@ import weakref from gi.repository import Gdk from gi.repository import GConf +from gi.repository import Gio from editfonts.core.basefont import BaseFont # from defcon import Font @@ -36,12 +37,12 @@ GdkPixbuf = 1 - ZONE_R = 20 # a flag to see if any particular tool is active in the editor area TOOL_ACTIVE = {'BezierPenTool': False} + # if the current page has changed the global data or not # FONT_EDITED = False @@ -67,13 +68,14 @@ def invX(x, id): # noqa def invY(y, id): # noqa return h - float(y) * h / GLYPH_BOX[id]['height'] - b + # ######### # User Info # ######### -client = GConf.Client.get_default() -color =\ - XoColor(client.get_string('/desktop/sugar/user/color')) +settings = Gio.Settings('org.sugarlabs.user') +color = \ + XoColor(settings.get_string('color')) USER_COLOR = color.to_string().split(',') # ###########