parent
a78fb1f62d
commit
6f34260d89
1 changed files with 9 additions and 3 deletions
|
@ -163,7 +163,9 @@ class Tab(object):
|
|||
log.debug("Invalid value for tab state: %s", value)
|
||||
elif STATE_PRIORITY[value] < STATE_PRIORITY[self._state] and \
|
||||
value not in ('current', 'disconnected'):
|
||||
log.debug("Did not set status because of lower priority, asked: %s, kept: %s", value, self._state)
|
||||
log.debug("Did not set state because of lower priority, asked: %s, kept: %s", value, self._state)
|
||||
elif self._state == 'disconnected' and value not in ('joined', 'current'):
|
||||
log.debug('Did not set state because disconnected tabs remain visible')
|
||||
else:
|
||||
self._state = value
|
||||
|
||||
|
@ -1036,7 +1038,10 @@ class MucTab(ChatTab):
|
|||
return self.text_win
|
||||
|
||||
def on_lose_focus(self):
|
||||
if self.joined:
|
||||
self.state = 'normal'
|
||||
else:
|
||||
self.state = 'disconnected'
|
||||
self.text_win.remove_line_separator()
|
||||
self.text_win.add_line_separator()
|
||||
if config.get_by_tabname('send_chat_states', 'true', self.general_jid, True) == 'true' and not self.input.get_text():
|
||||
|
@ -1299,6 +1304,7 @@ class MucTab(ChatTab):
|
|||
we can know if we can join it, send messages to it, etc
|
||||
"""
|
||||
self.users = []
|
||||
if self is not self.core.current_tab():
|
||||
self.state = 'disconnected'
|
||||
self.joined = False
|
||||
|
||||
|
|
Loading…
Reference in a new issue