[Kjell Braden] Fix OTR SMP.
This commit is contained in:
parent
e3e514cdc9
commit
37b6f7058a
|
@ -1694,17 +1694,17 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
for ctrl in ctrls:
|
for ctrl in ctrls:
|
||||||
ctrl.update_otr()
|
ctrl.update_otr()
|
||||||
|
|
||||||
ctx = gajim.otr_module. \
|
ctx = gajim.otr_module. \
|
||||||
otrl_context_find(
|
otrl_context_find(
|
||||||
self.otr_userstates,
|
self.otr_userstates,
|
||||||
frm.encode(),
|
frm.encode(),
|
||||||
gajim.get_jid_from_account(
|
gajim.get_jid_from_account(
|
||||||
self.name).encode(),
|
self.name).encode(),
|
||||||
gajim.OTR_PROTO, 1,
|
gajim.OTR_PROTO, 1,
|
||||||
(gajim.otr_add_appdata,
|
(gajim.otr_add_appdata,
|
||||||
self.name))[0]
|
self.name))[0]
|
||||||
tlvs = otr_msg_tuple[2]
|
tlvs = otr_msg_tuple[2]
|
||||||
ctx.app_data.handle_tlv(tlvs)
|
ctx.app_data.handle_tlv(tlvs)
|
||||||
|
|
||||||
if msgtxt == '':
|
if msgtxt == '':
|
||||||
return
|
return
|
||||||
|
|
|
@ -68,6 +68,11 @@ class ContactOtrSMPWindow:
|
||||||
self.smp_running = False
|
self.smp_running = False
|
||||||
self.finished = False
|
self.finished = False
|
||||||
|
|
||||||
|
self.gw('smp_cancel_button').set_sensitive(True)
|
||||||
|
self.gw('smp_ok_button').set_sensitive(True)
|
||||||
|
self.gw('progressbar').set_fraction(0)
|
||||||
|
self.gw('secret_entry').set_text('')
|
||||||
|
|
||||||
self.response = response
|
self.response = response
|
||||||
if response:
|
if response:
|
||||||
self.gw('desc_label').set_markup(_('<b>%s is trying ' \
|
self.gw('desc_label').set_markup(_('<b>%s is trying ' \
|
||||||
|
@ -104,7 +109,7 @@ class ContactOtrSMPWindow:
|
||||||
self.gw('desc_label').set_markup(text)
|
self.gw('desc_label').set_markup(text)
|
||||||
for ctrl in gajim.interface.msg_win_mgr.get_chat_controls(
|
for ctrl in gajim.interface.msg_win_mgr.get_chat_controls(
|
||||||
self.contact.jid, self.account):
|
self.contact.jid, self.account):
|
||||||
ctrl.update_otr()
|
ctrl.update_otr(True)
|
||||||
gajim.otr_ui_ops.write_fingerprints({'account': self.account})
|
gajim.otr_ui_ops.write_fingerprints({'account': self.account})
|
||||||
|
|
||||||
def handle_tlv(self, tlvs):
|
def handle_tlv(self, tlvs):
|
||||||
|
@ -310,7 +315,7 @@ class ContactOtrWindow:
|
||||||
self.ctrl = gajim.interface.msg_win_mgr.get_control(
|
self.ctrl = gajim.interface.msg_win_mgr.get_control(
|
||||||
self.contact.jid, self.account)
|
self.contact.jid, self.account)
|
||||||
if self.ctrl:
|
if self.ctrl:
|
||||||
self.ctrl.update_otr()
|
self.ctrl.update_otr(True)
|
||||||
|
|
||||||
if self.gw('otr_default_checkbutton').get_active():
|
if self.gw('otr_default_checkbutton').get_active():
|
||||||
# default is enabled, so remove any user-specific
|
# default is enabled, so remove any user-specific
|
||||||
|
|
Loading…
Reference in New Issue