comparison src/browser/sat_browser/plugin_sec_otr.py @ 540:22358ffa26e4

browser_side (plugin OTR): really clean everything on key drop
author souliane <souliane@mailoo.org>
date Sun, 07 Sep 2014 23:40:06 +0200
parents 19b8af73e945
children e903a9f79172
comparison
equal deleted inserted replaced
539:19b8af73e945 540:22358ffa26e4
546 def dropKey(confirm): 546 def dropKey(confirm):
547 if confirm: 547 if confirm:
548 # we end all sessions 548 # we end all sessions
549 for context in self.context_manager.contexts.values(): 549 for context in self.context_manager.contexts.values():
550 context.disconnect() 550 context.disconnect()
551 self.context_manager.contexts.clear()
551 self.context_manager.account.privkey = None 552 self.context_manager.account.privkey = None
552 self.context_manager.account.getPrivkey() # as account.privkey are None, getPrivkey will generate a new key, and save it
553 dialog.InfoDialog(KEY_TITLE, KEY_DROPPED_TXT, AddStyleName="maxWidthLimit").show() 553 dialog.InfoDialog(KEY_TITLE, KEY_DROPPED_TXT, AddStyleName="maxWidthLimit").show()
554 554
555 dialog.ConfirmDialog(dropKey, KEY_DROP_TXT.format(eol=DIALOG_EOL), KEY_DROP_TITLE, AddStyleName="maxWidthLimit").show() 555 dialog.ConfirmDialog(dropKey, KEY_DROP_TXT.format(eol=DIALOG_EOL), KEY_DROP_TITLE, AddStyleName="maxWidthLimit").show()
556 556
557 try: 557 try: