| | 1255 | self.completion_dict = {} |
| | 1256 | if to == '': |
| | 1257 | liststore = gtkgui_helpers.get_completion_liststore(self.to_entry) |
| | 1258 | # add all contacts to the model |
| | 1259 | for jid in gajim.contacts.get_jid_list(account): |
| | 1260 | contact = gajim.contacts.get_contact_with_highest_priority( |
| | 1261 | account, jid) |
| | 1262 | self.completion_dict[jid] = contact |
| | 1263 | name = contact.name |
| | 1264 | if self.completion_dict.has_key(name): |
| | 1265 | contact1 = self.completion_dict[name] |
| | 1266 | del self.completion_dict[name] |
| | 1267 | self.completion_dict['%s (%s)' % (name, contact1.jid)] = \ |
| | 1268 | contact1 |
| | 1269 | self.completion_dict['%s (%s)' % (name, jid)] = contact |
| | 1270 | else: |
| | 1271 | self.completion_dict[name] = contact |
| | 1272 | for jid in self.completion_dict.keys(): |
| | 1273 | contact = self.completion_dict[jid] |
| | 1274 | img = gajim.interface.roster.jabber_state_images['16'][ |
| | 1275 | contact.show] |
| | 1276 | liststore.append((img.get_pixbuf(), jid)) |
| | 1277 | |