[Kjell Braden] Fix OTR SMP.

This commit is contained in:
js 2008-05-29 18:42:58 +00:00
parent e3e514cdc9
commit 37b6f7058a
2 changed files with 18 additions and 13 deletions

View File

@ -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