Forgot to add files. Remove debug code
This commit is contained in:
parent
21b19924ea
commit
4f0a470b8e
14
sugar/canvas/CanvasWindow.py
Normal file
14
sugar/canvas/CanvasWindow.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import gtk
|
||||||
|
import goocanvas
|
||||||
|
|
||||||
|
class CanvasWindow(gtk.Window):
|
||||||
|
def __init__(self, model):
|
||||||
|
gtk.Window.__init__(self)
|
||||||
|
|
||||||
|
self._view = goocanvas.CanvasView()
|
||||||
|
self._view.set_model(model)
|
||||||
|
self.add(self._view)
|
||||||
|
self._view.show()
|
||||||
|
|
||||||
|
def get_view(self):
|
||||||
|
return self._view
|
@ -46,10 +46,6 @@ class GridLayout:
|
|||||||
|
|
||||||
[x, y, width, height] = self._get_geometry(group, item)
|
[x, y, width, height] = self._get_geometry(group, item)
|
||||||
|
|
||||||
print item
|
|
||||||
print [x, y, width, height]
|
|
||||||
print group.props.width
|
|
||||||
|
|
||||||
item.props.x = x
|
item.props.x = x
|
||||||
item.props.y = y
|
item.props.y = y
|
||||||
|
|
||||||
|
36
sugar/canvas/ScreenContainer.py
Normal file
36
sugar/canvas/ScreenContainer.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import gobject
|
||||||
|
import gtk
|
||||||
|
|
||||||
|
class ScreenContainer(gobject.GObject):
|
||||||
|
__gproperties__ = {
|
||||||
|
'width' : (int, None, None, 0, 1600, 800,
|
||||||
|
gobject.PARAM_READABLE),
|
||||||
|
'height' : (int, None, None, 0, 1200, 600,
|
||||||
|
gobject.PARAM_READABLE)
|
||||||
|
}
|
||||||
|
|
||||||
|
def __init__(self, windows, **kwargs):
|
||||||
|
self._width = gtk.gdk.screen_width()
|
||||||
|
self._height = gtk.gdk.screen_height()
|
||||||
|
self._windows = windows
|
||||||
|
|
||||||
|
gobject.GObject.__init__(self, **kwargs)
|
||||||
|
|
||||||
|
def do_set_property(self, pspec, value):
|
||||||
|
if pspec.name == 'width':
|
||||||
|
self._width = value
|
||||||
|
elif pspec.name == 'height':
|
||||||
|
self._height = value
|
||||||
|
|
||||||
|
def do_get_property(self, pspec):
|
||||||
|
if pspec.name == 'width':
|
||||||
|
return self._width
|
||||||
|
elif pspec.name == 'height':
|
||||||
|
return self._height
|
||||||
|
|
||||||
|
def set_layout(self, layout):
|
||||||
|
self._layout = layout
|
||||||
|
self._layout.layout_screen(self)
|
||||||
|
|
||||||
|
def get_windows(self):
|
||||||
|
return self._windows
|
Loading…
Reference in New Issue
Block a user