Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-04-16 08:36:15 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-04-16 08:36:15 (GMT)
commit5bfc64d9bef4c5cf202acfd9502133dd3238ec8c (patch)
tree660542928db24acd0733e87949f187ca22d5476c /shell/view
parentb2e0f257cec37b9de97ecf0ba279c5424722ce04 (diff)
Always center the owner in the home views
Diffstat (limited to 'shell/view')
-rw-r--r--shell/view/home/FriendsBox.py11
-rw-r--r--shell/view/home/MeshBox.py5
2 files changed, 6 insertions, 10 deletions
diff --git a/shell/view/home/FriendsBox.py b/shell/view/home/FriendsBox.py
index 6f1cdb7..71b9026 100644
--- a/shell/view/home/FriendsBox.py
+++ b/shell/view/home/FriendsBox.py
@@ -24,7 +24,7 @@ from sugar.graphics import units
from view.home.MyIcon import MyIcon
from view.home.FriendView import FriendView
-class FriendsBox(SpreadBox, hippo.CanvasItem):
+class FriendsBox(SpreadBox):
__gtype_name__ = 'SugarFriendsBox'
def __init__(self, shell, menu_shell):
SpreadBox.__init__(self, background_color=0xe2e2e2ff)
@@ -34,7 +34,7 @@ class FriendsBox(SpreadBox, hippo.CanvasItem):
self._friends = {}
self._my_icon = MyIcon(units.LARGE_ICON_SCALE)
- self.append(self._my_icon, hippo.PACK_FIXED)
+ self.set_center_item(self._my_icon)
friends = self._shell.get_model().get_friends()
@@ -56,10 +56,3 @@ class FriendsBox(SpreadBox, hippo.CanvasItem):
def _friend_removed_cb(self, data_model, key):
self.remove_item(self._friends[key])
del self._friends[key]
-
- def do_allocate(self, width, height, origin_changed):
- SpreadBox.do_allocate(self, width, height, origin_changed)
-
- [icon_width, icon_height] = self._my_icon.get_allocation()
- self.set_position(self._my_icon, (width - icon_width) / 2,
- (height - icon_height) / 2)
diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py
index 218a44d..fa85b03 100644
--- a/shell/view/home/MeshBox.py
+++ b/shell/view/home/MeshBox.py
@@ -278,7 +278,10 @@ class MeshBox(SpreadBox):
def _add_alone_buddy(self, buddy_model):
icon = BuddyIcon(self._shell, self._menu_shell, buddy_model)
- self.add_item(icon)
+ if buddy_model.is_owner():
+ self.set_center_item(icon)
+ else:
+ self.add_item(icon)
self._buddies[buddy_model.get_key()] = icon