| 2815 | | gajim.connections[account].change_status(status, txt, auto) |
| | 2815 | if to: |
| | 2816 | gajim.connections[account].send_custom_status(status, txt, to) |
| | 2817 | else: |
| | 2818 | was_invisible = gajim.connections[account].connected == \ |
| | 2819 | gajim.SHOW_LIST.index('invisible') |
| | 2820 | gajim.connections[account].change_status(status, txt, auto) |
| | 2821 | |
| | 2822 | if not gajim.interface.minimized_controls.has_key(account): |
| | 2823 | gajim.interface.minimized_controls[account] = {} |
| | 2824 | for gc_control in gajim.interface.msg_win_mgr.get_controls( |
| | 2825 | message_control.TYPE_GC) + \ |
| | 2826 | gajim.interface.minimized_controls[account].values(): |
| | 2827 | if gc_control.account == account: |
| | 2828 | if gajim.gc_connected[account][gc_control.room_jid]: |
| | 2829 | gajim.connections[account].send_gc_status(gc_control.nick, |
| | 2830 | gc_control.room_jid, status, txt) |
| | 2831 | else: |
| | 2832 | # for some reason, we are not connected to the room even if |
| | 2833 | # tab is opened, send initial join_gc() |
| | 2834 | gajim.connections[account].join_gc(gc_control.nick, |
| | 2835 | gc_control.room_jid, None) |
| | 2836 | if was_invisible: |
| | 2837 | # We come back from invisible, join bookmarks |
| | 2838 | for bm in gajim.connections[account].bookmarks: |
| | 2839 | room_jid = bm['jid'] |
| | 2840 | if room_jid in gajim.gc_connected[account] and \ |
| | 2841 | gajim.gc_connected[account][room_jid]: |
| | 2842 | continue |
| | 2843 | self.join_gc_room(account, room_jid, bm['nick'], bm['password'], |
| | 2844 | minimize = gajim.config.get('minimize_autojoined_rooms')) |