From 6951442efbc915f933967b4142ff190d5fb82a03 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 30 Jan 2008 10:46:12 +0000 Subject: [PATCH] re-compute big brother when a contact of a metacontact goes offline. fixes #3464 --- src/roster_window.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/roster_window.py b/src/roster_window.py index 7cd8fe169..9e4f2a7bb 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -520,7 +520,15 @@ class RosterWindow: gajim.account_is_disconnected(account))) and nb_events == 0: self.remove_contact(contact, account) else: - self.draw_contact(contact.jid, account) + # 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: + self.draw_contact(contact.jid, account) def remove_contact(self, contact, account): '''Remove a contact from the roster'''