* End ESession when remote signs off.

* Fix typo.
* Better code in conversation_textview.py.

@bct: Your diff didn't work, I had to move it + add an if. Seems to
work now.
This commit is contained in:
js 2008-07-22 14:32:37 +00:00
parent 229006a28e
commit 65d5d92087
2 changed files with 21 additions and 11 deletions

View File

@ -397,11 +397,8 @@ class ConversationTextview:
self.smooth_scroll_timer.cancel()
def show_xep0184_warning(self, id):
try:
if self.xep0184_marks[id] is not None:
return
except KeyError:
pass
if self.xep0184_marks.has_key(id):
return
buffer = self.tv.get_buffer()
buffer.begin_user_action()
@ -427,10 +424,7 @@ class ConversationTextview:
buffer.end_user_action()
def hide_xep0184_warning(self, id):
try:
if self.xep0184_marks[id] is None:
return
except KeyError:
if not self.xep0184_marks.has_key(id):
return
if self.xep0184_shown[id] == NOT_SHOWN:
@ -452,7 +446,7 @@ class ConversationTextview:
buffer.end_user_action()
self.xep0184_marks[id] = None
del self.xep0184_marks[id]
del self.xep0184_shown[id]
def show_focus_out_line(self):

View File

@ -773,6 +773,22 @@ class Interface:
# resource signs off!
gajim.connections[account]. \
remove_transfers_for_contact(contact1)
# disable encryption, since if any messages are
# lost they'll be not decryptable (note that
# this contradicts XEP-0201 - trying to get the
# in the XEP, though)
if gajim.connections[account].sessions. \
has_key(ji):
for sess in gajim.connections \
[account]. sessions[ji].values():
if sess.enable_encryption:
sess.terminate_e2e()
gajim.connections \
[account]. \
delete_session(jid,
sess.thread_id)
self.roster.chg_contact_status(contact1, array[1],
status_message, account)
# Notifications
@ -786,7 +802,7 @@ class Interface:
elif old_show > 1 and new_show < 2:
notify.notify('contact_disconnected', jid,
ccount, status_message)
account, status_message)
if self.remote_ctrl:
self.remote_ctrl.raise_signal(
'ContactAbsence',