diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-27 12:41:51 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-27 12:41:51 (GMT) |
commit | b04c19efb41f39f578e558031fa89f81559d89e2 (patch) | |
tree | 458238f3c48f1eeef0a56ebb4b41c1a04e9f2114 /shell/view/frame/PanelWindow.py | |
parent | abf84970b513a5e00eb6524244e19e398414f372 (diff) |
Add a window class to graphics, it contains a canvas.
Diffstat (limited to 'shell/view/frame/PanelWindow.py')
-rw-r--r-- | shell/view/frame/PanelWindow.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/shell/view/frame/PanelWindow.py b/shell/view/frame/PanelWindow.py index 6edd4bd..cf3fc41 100644 --- a/shell/view/frame/PanelWindow.py +++ b/shell/view/frame/PanelWindow.py @@ -18,34 +18,27 @@ import gtk import hippo from sugar.graphics import units +from sugar.graphics.window import Window -class PanelWindow(gtk.Window): +class PanelWindow(Window): def __init__(self, orientation): - gtk.Window.__init__(self) + Window.__init__(self) self._orientation = orientation self.set_decorated(False) self.connect('realize', self._realize_cb) - self._canvas = hippo.Canvas() - self._bg = hippo.CanvasBox(background_color=0x414141ff, orientation=self._orientation) + self.set_root(self._bg) self._update_size() - self._canvas.set_root(self._bg) - - self.add(self._canvas) - self._canvas.show() - + screen = gtk.gdk.screen_get_default() screen.connect('size-changed', self._size_changed_cb) def get_root(self): return self._bg - - def get_canvas(self): - return self._canvas def _update_size(self): padding = units.grid_to_pixels(1) |