diff options
author | Dan Williams <dcbw@localhost.localdomain> | 2006-09-21 17:52:17 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@localhost.localdomain> | 2006-09-21 17:52:17 (GMT) |
commit | f9012b88f60f8e4ac96cb55aea763edc74ad586e (patch) | |
tree | 5f219be3d4a4e711d1f2ee4b9114a282c2601ab0 /shell | |
parent | 66124465e89b9d39edfab62c5a6761f5b8b7656a (diff) |
Move remove code down to fix undefined var error
Diffstat (limited to 'shell')
-rw-r--r-- | shell/view/BuddyIcon.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/shell/view/BuddyIcon.py b/shell/view/BuddyIcon.py index 0cf90fe..607dec6 100644 --- a/shell/view/BuddyIcon.py +++ b/shell/view/BuddyIcon.py @@ -20,18 +20,17 @@ 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(buddy) - 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) |