Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
@@ -4,7 +4,7 @@ from view.BuddyMenu import BuddyMenu
|
||||
class BuddyIcon(MenuIcon):
|
||||
def __init__(self, shell, menu_shell, friend):
|
||||
MenuIcon.__init__(self, menu_shell, icon_name='stock-buddy',
|
||||
color=friend.get_color(), size=96)
|
||||
color=friend.get_color(), size=112)
|
||||
|
||||
self._shell = shell
|
||||
self._friend = friend
|
||||
@@ -20,17 +20,19 @@ class BuddyIcon(MenuIcon):
|
||||
def _popup_action_cb(self, popup, action):
|
||||
self.popdown()
|
||||
|
||||
model = self._shell.get_model()
|
||||
|
||||
if action == BuddyMenu.ACTION_REMOVE_FRIEND:
|
||||
friends = model.get_friends()
|
||||
friends.remove(self._friend)
|
||||
|
||||
buddy = self._friend.get_buddy()
|
||||
if buddy == None:
|
||||
return
|
||||
|
||||
model = self._shell.get_model()
|
||||
if action == BuddyMenu.ACTION_INVITE:
|
||||
activity = model.get_current_activity()
|
||||
activity.invite(buddy)
|
||||
elif action == BuddyMenu.ACTION_MAKE_FRIEND:
|
||||
friends = model.get_friends()
|
||||
friends.make_friend(buddy)
|
||||
elif action == BuddyMenu.ACTION_REMOVE_FRIEND:
|
||||
friends = model.get_friends()
|
||||
friends.remove(buddy)
|
||||
|
||||
@@ -15,7 +15,7 @@ class FriendsGroup(goocanvas.Group):
|
||||
self._icon_layout = IconLayout(1200, 900)
|
||||
self._friends = {}
|
||||
|
||||
me = MyIcon(100)
|
||||
me = MyIcon(112)
|
||||
me.translate(600 - (me.get_property('size') / 2),
|
||||
450 - (me.get_property('size') / 2))
|
||||
self.add_child(me)
|
||||
|
||||
@@ -14,7 +14,7 @@ class ActivityItem(IconItem):
|
||||
self._activity = activity
|
||||
|
||||
IconItem.__init__(self, icon_name=self.get_icon_name(),
|
||||
color=self.get_color(), size=96)
|
||||
color=self.get_color(), size=112)
|
||||
|
||||
def get_id(self):
|
||||
return self._activity.get_id()
|
||||
|
||||
Reference in New Issue
Block a user