Author: asterix Date: 2006-07-19 23:27:40 +0200 (Wed, 19 Jul 2006) New Revision: 6585
Modified: trunk/src/roster_window.py Log: when we expand a contact, expand also all other iter from the same contact in other groups. Fixes #1973
Modified: trunk/src/roster_window.py =================================================================== --- trunk/src/roster_window.py 2006-07-19 15:44:13 UTC (rev 6584) +++ trunk/src/roster_window.py 2006-07-19 21:27:40 UTC (rev 6585) @@ -1835,8 +1835,20 @@ model = self.tree.get_model() iter = model.get_iter(path) type = model[iter][C_TYPE] - if type in ('group', 'contact'): - if x < 27: # first cell in 1st column (the arrow SINGLE clicked) + if type == 'group' and x < 27: + # first cell in 1st column (the arrow SINGLE clicked) + if (self.tree.row_expanded(path)): + self.tree.collapse_row(path) + else: + self.tree.expand_row(path, False) + + elif type == 'contact' and x < 27: + account = model[iter][C_ACCOUNT].decode('utf-8') + jid = model[iter][C_JID].decode('utf-8') + # first cell in 1st column (the arrow SINGLE clicked) + iters = self.get_contact_iter(jid, account) + for iter in iters: + path = model.get_path(iter) if (self.tree.row_expanded(path)): self.tree.collapse_row(path) else: