From e421c539e7920a98dfca5aad204b469d4114ff7c Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 11 Sep 2006 07:41:42 +0000 Subject: [PATCH] draw account name between [] only if it has child, and redraw account row after we add children. Fixes #2151 --- src/roster_window.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 9c740ad67..b7f46ba33 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -194,10 +194,10 @@ class RosterWindow: path = model.get_path(iter) if self.regroup: account = _('Merged accounts') - if self.tree.row_expanded(path): - model[iter][C_NAME] = account - else: + if not self.tree.row_expanded(path) and model.iter_has_child(iter): model[iter][C_NAME] = '[%s]' % account + else: + model[iter][C_NAME] = account def remove_newly_added(self, jid, account): if jid in gajim.newly_added[account]: @@ -994,6 +994,7 @@ class RosterWindow: '''adds contacts of group to roster treeview''' for jid in gajim.contacts.get_jid_list(account): self.add_contact_to_roster(jid, account) + self.draw_account(account) def fire_up_unread_messages_events(self, account): '''reads from db the unread messages, and fire them up'''