Author: steve-e Date: 2008-07-01 00:23:07 +0200 (Tue, 01 Jul 2008) New Revision: 9869
Modified: trunk/src/roster_window.py Log: Fix really bad modelfilter bug that may have caused segfaults.
This also fixes the problem of showing the wrong icon when expanding metacontacts.
Example: We have the groups A, B, C in our child model But only A and C are visible (and therefore in modelfilter)
Imagine we have a childIter_G pointing to group B Getting its path in the childmodel, will give us (lets say) 2 2 means now the second group/row in the CHILD model We now pass this to the tree and tell him "Expand row 2" The tree itself is looking at the 2nd row of modelfilter: "Hey modelfilter, expand row number 2"
For modelfilter row number 2 is C and NOT B
Modified: trunk/src/roster_window.py =================================================================== --- trunk/src/roster_window.py 2008-06-30 21:27:04 UTC (rev 9868) +++ trunk/src/roster_window.py 2008-06-30 22:23:07 UTC (rev 9869) @@ -906,7 +906,6 @@ account_name = account accounts = [account]
- path = self.model.get_path(child_iter) if account in self.collapsed_rows and \ self.model.iter_has_child(child_iter): account_name = '[%s]' % account_name @@ -1057,7 +1056,8 @@ if have_visible_children: # We are the big brother and have a visible family for child_iter in child_iters: - path = self.model.get_path(child_iter) + child_path = self.model.get_path(child_iter) + path = self.modelfilter.convert_child_path_to_path(child_path)
if not self.tree.row_expanded(path) and icon_name != 'event': iterC = self.model.iter_children(child_iter)