Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco 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)
commitf2b2b8c6baaf9cb1159c2f962e3c609b927bd550 (patch)
tree6d02daf5c575ed8652d28f9b6c1cdf2ce06046e0 /shell
parent17913d20b893ebdf5b23e9e06a9e20c927a70c7e (diff)
Fix friends removal
Diffstat (limited to 'shell')
-rw-r--r--shell/view/BuddyIcon.py10
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)