From b3452663bc3cda80bf83b45385027897574696a9 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 27 Feb 2007 20:08:33 +0100 Subject: [PATCH 1/2] Use a custom style to get rid of the damned window background --- sugar/graphics/window.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sugar/graphics/window.py b/sugar/graphics/window.py index 1ff1fdbb..85cbc4e1 100644 --- a/sugar/graphics/window.py +++ b/sugar/graphics/window.py @@ -1,18 +1,24 @@ import hippo import gtk +from sugar.graphics import color + +class _Style(gtk.Style): + __gtype_name__ = 'SugarCanvasStyle' + def __init__(self): + gtk.Style.__init__(self) + + def do_set_background(self, window, state): + window.set_back_pixmap(None, False) + class Window(gtk.Window): def __init__(self, window_type=gtk.WINDOW_TOPLEVEL): gtk.Window.__init__(self, window_type) self._canvas = hippo.Canvas() + self._canvas.set_style(_Style()) self.add(self._canvas) self._canvas.show() - self._canvas.connect_after('realize', self._window_realize_cb) - def set_root(self, root): self._canvas.set_root(root) - - def _window_realize_cb(self, canvas): - canvas.window.set_back_pixmap(None, False) From 152d95f3ded7a7695ac37e42bfece276b6964b80 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 27 Feb 2007 20:22:38 +0100 Subject: [PATCH 2/2] properly manage the registered field in the config file --- sugar/profile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sugar/profile.py b/sugar/profile.py index 526c0f9d..4df0f522 100644 --- a/sugar/profile.py +++ b/sugar/profile.py @@ -50,7 +50,9 @@ class _Profile(object): self.server = cp.get('Server', 'Server') if cp.has_option('Server', 'Registered'): - self.server_registered = cp.get('Server', 'Registered') + registered = cp.get('Server', 'Registered') + if registered.lower() == "true": + self.server_registered = True del cp