Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
commit
a8cabac590
@ -1,18 +1,24 @@
|
|||||||
import hippo
|
import hippo
|
||||||
import gtk
|
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):
|
class Window(gtk.Window):
|
||||||
def __init__(self, window_type=gtk.WINDOW_TOPLEVEL):
|
def __init__(self, window_type=gtk.WINDOW_TOPLEVEL):
|
||||||
gtk.Window.__init__(self, window_type)
|
gtk.Window.__init__(self, window_type)
|
||||||
|
|
||||||
self._canvas = hippo.Canvas()
|
self._canvas = hippo.Canvas()
|
||||||
|
self._canvas.set_style(_Style())
|
||||||
self.add(self._canvas)
|
self.add(self._canvas)
|
||||||
self._canvas.show()
|
self._canvas.show()
|
||||||
|
|
||||||
self._canvas.connect_after('realize', self._window_realize_cb)
|
|
||||||
|
|
||||||
def set_root(self, root):
|
def set_root(self, root):
|
||||||
self._canvas.set_root(root)
|
self._canvas.set_root(root)
|
||||||
|
|
||||||
def _window_realize_cb(self, canvas):
|
|
||||||
canvas.window.set_back_pixmap(None, False)
|
|
||||||
|
@ -50,7 +50,9 @@ class _Profile(object):
|
|||||||
self.server = cp.get('Server', 'Server')
|
self.server = cp.get('Server', 'Server')
|
||||||
|
|
||||||
if cp.has_option('Server', 'Registered'):
|
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
|
del cp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user