Move the menu positioning code inside menu shell and

unify it.
This commit is contained in:
Marco Pesenti Gritti
2006-10-18 16:23:06 +02:00
parent 7a06102b2e
commit 54dcb672e5
9 changed files with 70 additions and 99 deletions
+3 -5
View File
@@ -19,10 +19,10 @@ import hippo
import cairo
from sugar.graphics.menushell import MenuShell
import sugar
from view.home.MeshBox import MeshBox
from view.home.HomeBox import HomeBox
from view.home.FriendsBox import FriendsBox
import sugar
class HomeWindow(gtk.Window):
def __init__(self, shell):
@@ -42,8 +42,6 @@ class HomeWindow(gtk.Window):
self.add(self._nb)
self._nb.show()
menu_shell = MenuShell()
canvas = hippo.Canvas()
box = HomeBox(shell)
canvas.set_root(box)
@@ -51,13 +49,13 @@ class HomeWindow(gtk.Window):
canvas.show()
canvas = hippo.Canvas()
box = FriendsBox(shell, menu_shell)
box = FriendsBox(shell, MenuShell(canvas))
canvas.set_root(box)
self._nb.append_page(canvas)
canvas.show()
canvas = hippo.Canvas()
box = MeshBox(shell, menu_shell)
box = MeshBox(shell, MenuShell(canvas))
canvas.set_root(box)
self._nb.append_page(canvas)
canvas.show()