diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-22 19:36:52 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-22 19:36:52 (GMT) |
commit | f2b2b8c6baaf9cb1159c2f962e3c609b927bd550 (patch) | |
tree | 6d02daf5c575ed8652d28f9b6c1cdf2ce06046e0 /shell | |
parent | 17913d20b893ebdf5b23e9e06a9e20c927a70c7e (diff) |
Fix friends removal
Diffstat (limited to 'shell')
-rw-r--r-- | shell/view/BuddyIcon.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/shell/view/BuddyIcon.py b/shell/view/BuddyIcon.py index 05aaa84..4fec55b 100644 --- a/shell/view/BuddyIcon.py +++ b/shell/view/BuddyIcon.py @@ -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) |