2006-09-07 15:11:51 +02:00
|
|
|
import gtk
|
2006-09-13 13:50:00 +02:00
|
|
|
import goocanvas
|
2006-09-07 15:11:51 +02:00
|
|
|
|
2006-09-13 13:50:00 +02:00
|
|
|
from sugar.canvas.CanvasView import CanvasView
|
2006-09-07 15:11:51 +02:00
|
|
|
|
2006-09-13 13:50:00 +02:00
|
|
|
class PanelWindow(gtk.Window):
|
|
|
|
def __init__(self, grid, model, x, y, width, height):
|
|
|
|
gtk.Window.__init__(self)
|
|
|
|
|
|
|
|
self._grid = grid
|
2006-09-07 15:11:51 +02:00
|
|
|
|
|
|
|
self.set_decorated(False)
|
|
|
|
|
|
|
|
self.realize()
|
|
|
|
self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
|
|
|
|
self.window.set_accept_focus(False)
|
|
|
|
|
|
|
|
screen = gtk.gdk.screen_get_default()
|
|
|
|
self.window.set_transient_for(screen.get_root_window())
|
2006-09-13 13:50:00 +02:00
|
|
|
|
|
|
|
view = CanvasView()
|
|
|
|
view.show()
|
|
|
|
self.add(view)
|
|
|
|
view.set_model(model)
|
|
|
|
|
|
|
|
self._grid.set_constraints(self, x, y, width, height)
|
|
|
|
self._grid.set_constraints(view, x, y, width, height)
|