Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view/frame/PanelWindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'shell/view/frame/PanelWindow.py')
-rw-r--r--shell/view/frame/PanelWindow.py31
1 files changed, 14 insertions, 17 deletions
diff --git a/shell/view/frame/PanelWindow.py b/shell/view/frame/PanelWindow.py
index 549776f..0c2930c 100644
--- a/shell/view/frame/PanelWindow.py
+++ b/shell/view/frame/PanelWindow.py
@@ -1,27 +1,24 @@
import gtk
-import goocanvas
-
-from sugar.canvas.CanvasView import CanvasView
+import hippo
class PanelWindow(gtk.Window):
- def __init__(self, grid, model, x, y, width, height):
+ def __init__(self):
gtk.Window.__init__(self)
- self._grid = grid
-
self.set_decorated(False)
+ self.connect('realize', self._realize_cb)
- self.realize()
- self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
- self.window.set_accept_focus(False)
+ canvas = hippo.Canvas()
- screen = gtk.gdk.screen_get_default()
- self.window.set_transient_for(screen.get_root_window())
+ self._bg = hippo.CanvasBox(background_color=0x4f4f4fff)
+ canvas.set_root(self._bg)
- view = CanvasView()
- view.show()
- self.add(view)
- view.set_model(model)
+ self.add(canvas)
+ canvas.show()
- self._grid.set_constraints(self, x, y, width, height)
- self._grid.set_constraints(view, x, y, width, height)
+ def get_root(self):
+ return self._bg
+
+ def _realize_cb(self, widget):
+ self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+ self.window.set_accept_focus(False)