diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/view/BuddyIcon.py | 12 | ||||
-rw-r--r-- | shell/view/home/FriendsGroup.py | 2 | ||||
-rw-r--r-- | shell/view/home/MeshGroup.py | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/shell/view/BuddyIcon.py b/shell/view/BuddyIcon.py index 607dec6..4fec55b 100644 --- a/shell/view/BuddyIcon.py +++ b/shell/view/BuddyIcon.py @@ -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) diff --git a/shell/view/home/FriendsGroup.py b/shell/view/home/FriendsGroup.py index bac8cff..1c2ea3a 100644 --- a/shell/view/home/FriendsGroup.py +++ b/shell/view/home/FriendsGroup.py @@ -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) diff --git a/shell/view/home/MeshGroup.py b/shell/view/home/MeshGroup.py index 6111823..4578a01 100644 --- a/shell/view/home/MeshGroup.py +++ b/shell/view/home/MeshGroup.py @@ -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() |