Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-05 16:53:34 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-05 16:53:34 (GMT)
commit1b0e469dbd90572d2bf6e4b928d1022a99c447c3 (patch)
tree77d7143b0b37b975290fa20a0325938dd72d8f77 /shell
parent924fe94b1697f96acc04ccc632b164c9256e1f35 (diff)
More work on the views layout
Diffstat (limited to 'shell')
-rw-r--r--shell/view/BuddyMenu.py3
-rw-r--r--shell/view/home/MeshBox.py11
2 files changed, 8 insertions, 6 deletions
diff --git a/shell/view/BuddyMenu.py b/shell/view/BuddyMenu.py
index 3b0d69c..814196a 100644
--- a/shell/view/BuddyMenu.py
+++ b/shell/view/BuddyMenu.py
@@ -1,5 +1,6 @@
import gtk
import gobject
+import hippo
from sugar.graphics.menu import Menu
from sugar.graphics.canvasicon import CanvasIcon
@@ -22,7 +23,7 @@ class BuddyMenu(Menu):
scaled_pixbuf = pixbuf.scale_simple(_ICON_SIZE, _ICON_SIZE,
gtk.gdk.INTERP_BILINEAR)
del pixbuf
- icon_item = hippo.Image(pixbuf=scaled_pixbuf)
+ icon_item = hippo.CanvasImage(pixbuf=scaled_pixbuf)
Menu.__init__(self, buddy.get_name(), icon_item)
diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py
index 281ddc1..9b3ce3c 100644
--- a/shell/view/home/MeshBox.py
+++ b/shell/view/home/MeshBox.py
@@ -8,7 +8,8 @@ from view.BuddyIcon import BuddyIcon
from sugar.graphics.snowflakelayout import SnowflakeLayout
import conf
-class ActivityView(hippo.CanvasBox):
+class ActivityView(hippo.CanvasBox, hippo.CanvasItem):
+ __gtype_name__ = 'SugarActivityView'
def __init__(self, shell, menu_shell, model):
hippo.CanvasBox.__init__(self)
@@ -35,16 +36,16 @@ class ActivityView(hippo.CanvasBox):
self.remove(icon)
del self._icons[name]
- def get_size_request(self):
- size = self._layout.get_size()
- return [size, size]
-
def _clicked_cb(self, item):
registry = conf.get_activity_registry()
default_type = self._model.get_service().get_type()
bundle = registry.get_activity_from_type(default_type)
self._shell.join_activity(bundle.get_id(), self._model.get_id())
+ def do_allocate(self, width, height):
+ hippo.CanvasBox.do_allocate(self, width, height)
+ self._layout.layout(self)
+
class MeshBox(hippo.CanvasBox, hippo.CanvasItem):
__gtype_name__ = 'SugarMeshBox'
def __init__(self, shell, menu_shell):