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