re-compute big brother when a contact of a metacontact goes offline. fixes #3464

This commit is contained in:
Yann Leboulanger 2008-01-30 10:46:12 +00:00
parent d85e0fdc75
commit 6951442efb
1 changed files with 9 additions and 1 deletions

View File

@ -519,6 +519,14 @@ class RosterWindow:
(not _('Transports') in contact.groups or \ (not _('Transports') in contact.groups or \
gajim.account_is_disconnected(account))) and nb_events == 0: gajim.account_is_disconnected(account))) and nb_events == 0:
self.remove_contact(contact, account) self.remove_contact(contact, account)
else:
# If it's a metacontact, big brother may have changed, so remove and
# re-add
model = self.tree.get_model()
iters = self.get_contact_iter(contact.jid, account)
if iters and model.iter_has_child(iters[0]):
self.remove_contact(contact, account)
self.add_contact_to_roster(contact.jid, account)
else: else:
self.draw_contact(contact.jid, account) self.draw_contact(contact.jid, account)