From 7900e6c486938692f8ed2ba61fd73d8f5b488246 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 9 Jul 2007 22:22:41 +0200 Subject: [PATCH] #1720: Show the owner's buddy menu in the Groups view. --- NEWS | 1 + shell/view/home/FriendsBox.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 1bc9431e..e49e0e9e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ * #1953: Retrieve friends' nicks from the profile. (tomeu) +* #1720: Show the owner's buddy menu in the Groups view. (tomeu) Snapshot aa6a024368 diff --git a/shell/view/home/FriendsBox.py b/shell/view/home/FriendsBox.py index 39afa0bc..6e890252 100644 --- a/shell/view/home/FriendsBox.py +++ b/shell/view/home/FriendsBox.py @@ -19,9 +19,12 @@ import random import hippo import gobject +from sugar import profile from sugar.graphics.spreadlayout import SpreadLayout from sugar.graphics import units -from view.home.MyIcon import MyIcon + +from shell.model.BuddyModel import BuddyModel +from view.BuddyIcon import BuddyIcon from view.home.FriendView import FriendView class FriendsBox(hippo.CanvasBox): @@ -35,8 +38,10 @@ class FriendsBox(hippo.CanvasBox): self._layout = SpreadLayout() self.set_layout(self._layout) - self._my_icon = MyIcon(units.LARGE_ICON_SCALE) - self._layout.add_center(self._my_icon) + buddy_model = BuddyModel(key=profile.get_pubkey()) + self._owner_icon = BuddyIcon(shell, buddy_model) + self._owner_icon.props.scale = units.LARGE_ICON_SCALE + self._layout.add_center(self._owner_icon) friends = self._shell.get_model().get_friends()