Correctly readd a metacontact family after removing a single brother.

* Coding standards
* remove useless key-list creation
This commit is contained in:
Stephan Erb 2008-07-06 22:24:58 +00:00
parent 926953252b
commit 0bb1f1d656
2 changed files with 18 additions and 14 deletions

View file

@ -692,7 +692,7 @@ class RosterWindow:
if not force and self.contact_has_pending_roster_events(contact, account):
# Contact has pending events
key = (jid, account)
if not key in self.contacts_to_be_removed.keys():
if not key in self.contacts_to_be_removed:
self.contacts_to_be_removed[key] = {'backend': backend}
return False
else:
@ -705,13 +705,17 @@ class RosterWindow:
else:
self._remove_entity(contact, account)
# Draw all groups of the contact
if backend:
# Remove contact before redrawing, otherwise the old
# numbers will still be show
gajim.contacts.remove_jid(account, jid)
gajim.contacts.remove_jid(account, jid, remove_meta=True)
family = gajim.contacts.get_metacontacts_family(account, jid)
if family:
# reshow the rest of the family
self._add_metacontact_family(family, account)
# Draw all groups of the contact
for group in contact.get_shown_groups():
self.draw_group(group, account)
self.draw_account(account)