| 1198 | | jid_list = [contact.jid] |
| 1199 | | for jid in jid_list: |
| 1200 | | if gajim.interface.msg_win_mgr.has_window(jid, account): |
| 1201 | | win = gajim.interface.msg_win_mgr.get_window(jid, account) |
| 1202 | | ctrl = win.get_control(jid, account) |
| 1203 | | ctrl.contact = gajim.contacts.get_contact_with_highest_priority( |
| 1204 | | account, contact.jid) |
| 1205 | | ctrl.update_ui() |
| 1206 | | win.redraw_tab(ctrl) |
| 1207 | | |
| 1208 | | name = contact.get_shown_name() |
| 1209 | | |
| 1210 | | # if multiple resources (or second one disconnecting) |
| 1211 | | if (len(contact_instances) > 1 or (len(contact_instances) == 1 and \ |
| 1212 | | show in ('offline', 'error'))) and contact.resource != '': |
| 1213 | | name += '/' + contact.resource |
| 1214 | | |
| 1215 | | uf_show = helpers.get_uf_show(show) |
| 1216 | | if status: |
| 1217 | | ctrl.print_conversation(_('%s is now %s (%s)') % (name, uf_show, |
| 1218 | | status), 'status') |
| 1219 | | else: # No status message |
| 1220 | | ctrl.print_conversation(_('%s is now %s') % (name, uf_show), |
| 1221 | | 'status') |
| | 1205 | if gajim.interface.msg_win_mgr.has_window(contact.jid, account): |
| | 1206 | win = gajim.interface.msg_win_mgr.get_window(contact.jid, account) |
| | 1207 | ctrl = win.get_control(contact.jid, account) |
| | 1208 | ctrl.contact = gajim.contacts.get_contact_with_highest_priority( |
| | 1209 | account, contact.jid) |
| | 1210 | ctrl.update_ui() |
| | 1211 | win.redraw_tab(ctrl) |
| | 1212 | |
| | 1213 | uf_show = helpers.get_uf_show(show) |
| | 1214 | if status: |
| | 1215 | ctrl.print_conversation(_('%s is now %s (%s)') % (name, uf_show, |
| | 1216 | status), 'status') |
| | 1217 | else: # No status message |
| | 1218 | ctrl.print_conversation(_('%s is now %s') % (name, uf_show), |
| | 1219 | 'status') |
| | 1220 | |