Fixes an indentation error aswell as the previous commit
This commit is contained in:
parent
d495deaa02
commit
313f002958
|
@ -1600,6 +1600,12 @@ class ChatControl(ChatControlBase):
|
||||||
if state in states:
|
if state in states:
|
||||||
self.audio_state = states[state]
|
self.audio_state = states[state]
|
||||||
|
|
||||||
|
# Destroy existing session with the user when he signs off
|
||||||
|
# We need to do that before modifying the sid
|
||||||
|
if state == 'not_available':
|
||||||
|
gajim.connections[self.account].delete_jingle_session(
|
||||||
|
self.contact.get_full_jid(), self.audio_sid)
|
||||||
|
|
||||||
if state in ('not_available', 'available', 'stop'):
|
if state in ('not_available', 'available', 'stop'):
|
||||||
self.audio_sid = None
|
self.audio_sid = None
|
||||||
if state in ('connection_received', 'connecting'):
|
if state in ('connection_received', 'connecting'):
|
||||||
|
@ -1610,11 +1616,6 @@ class ChatControl(ChatControlBase):
|
||||||
elif state in ('not_available', 'stop'):
|
elif state in ('not_available', 'stop'):
|
||||||
self._audio_button.set_active(False)
|
self._audio_button.set_active(False)
|
||||||
|
|
||||||
# Destroy existing session with the user when he signs off
|
|
||||||
if state == 'not_available':
|
|
||||||
gajim.connections[self.account].delete_jingle_session(
|
|
||||||
self.contact.get_full_jid(), self.audio_sid)
|
|
||||||
|
|
||||||
self.update_audio()
|
self.update_audio()
|
||||||
|
|
||||||
def set_video_state(self, state, sid=None, reason=None):
|
def set_video_state(self, state, sid=None, reason=None):
|
||||||
|
@ -1636,6 +1637,12 @@ class ChatControl(ChatControlBase):
|
||||||
if state in states:
|
if state in states:
|
||||||
self.video_state = states[state]
|
self.video_state = states[state]
|
||||||
|
|
||||||
|
# Destroy existing session with the user when he signs off
|
||||||
|
# We need to do that before modifying the sid
|
||||||
|
if state == 'not_available':
|
||||||
|
gajim.connections[self.account].delete_jingle_session(
|
||||||
|
self.contact.get_full_jid(), self.video_sid)
|
||||||
|
|
||||||
if state in ('not_available', 'available', 'stop'):
|
if state in ('not_available', 'available', 'stop'):
|
||||||
self.video_sid = None
|
self.video_sid = None
|
||||||
if state in ('connection_received', 'connecting'):
|
if state in ('connection_received', 'connecting'):
|
||||||
|
@ -1646,11 +1653,6 @@ class ChatControl(ChatControlBase):
|
||||||
elif state in ('not_available', 'stop'):
|
elif state in ('not_available', 'stop'):
|
||||||
self._video_button.set_active(False)
|
self._video_button.set_active(False)
|
||||||
|
|
||||||
# Destroy existing session with the user when he signs off
|
|
||||||
if state == 'not_available':
|
|
||||||
gajim.connections[self.account].delete_jingle_session(
|
|
||||||
self.contact.get_full_jid(), self.video_sid)
|
|
||||||
|
|
||||||
self.update_video()
|
self.update_video()
|
||||||
|
|
||||||
def on_avatar_eventbox_enter_notify_event(self, widget, event):
|
def on_avatar_eventbox_enter_notify_event(self, widget, event):
|
||||||
|
|
Loading…
Reference in New Issue