Changeset 9594 for trunk/src/roster_window.py
- Timestamp:
- 05/07/08 19:42:42 (4 months ago)
- Files:
-
- 1 modified
-
trunk/src/roster_window.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/roster_window.py
r9588 r9594 124 124 125 125 126 def _get_self_contact_iter(self, account, model = None):126 def _get_self_contact_iter(self, jid, account, model = None): 127 127 ''' Return the gtk.TreeIter of SelfContact or None if not found. 128 128 129 129 Keyword arguments: 130 jid -- the jid of SelfContact 130 131 account -- the account of SelfContact 131 132 model -- the data model (default TreeFilterModel) … … 136 137 model = self.modelfilter 137 138 iterAcct = self._get_account_iter(account, model) 138 iter = model.iter_children(iterAcct) 139 if iter and model[iter][C_TYPE] == 'self_contact': 140 return iter 139 iterC = model.iter_children(iterAcct) 140 141 # There might be several SelfContacts in merged account view 142 while iterC: 143 if model[iterC][C_TYPE] != 'self_contact': 144 break 145 iter_jid = model[iterC][C_JID] 146 if iter_jid and jid == iter_jid.decode('utf-8'): 147 return iterC 148 iterC = model.iter_next(iterC) 141 149 return None 142 150 … … 158 166 159 167 if jid == gajim.get_jid_from_account(account): 160 iter = self._get_self_contact_iter( account, model)168 iter = self._get_self_contact_iter(jid, account, model) 161 169 if iter: 162 170 return [iter]
