comparison src/browser/sat_browser/menu.py @ 529:9bfd71e2b35c

plugin OTR: disconnect the active OTR sessions on profile disconnection
author souliane <souliane@mailoo.org>
date Fri, 05 Sep 2014 11:41:40 +0200
parents 35ccb3ff8245
children dd43132684b9
comparison
equal deleted inserted replaced
528:ac66b8b11ab8 529:9bfd71e2b35c
102 self.host.setSelected(web_panel) 102 self.host.setSelected(web_panel)
103 103
104 def onDisconnect(self): 104 def onDisconnect(self):
105 def confirm_cb(answer): 105 def confirm_cb(answer):
106 if answer: 106 if answer:
107 # FIXME: are we sure the triggers finished their jobs when the backend disconnect?
108 # FIXME: disconnection on timeout is not handled yet...
109 for plugin in self.plugins.values():
110 if hasattr(plugin, 'profileConnected'):
111 plugin.profileDisconnected()
107 log.info("disconnection") 112 log.info("disconnection")
108 self.host.bridge.call('disconnect', None) 113 self.host.bridge.call('disconnect', None)
109 _dialog = dialog.ConfirmDialog(confirm_cb, text="Do you really want to disconnect ?") 114 _dialog = dialog.ConfirmDialog(confirm_cb, text="Do you really want to disconnect ?")
110 _dialog.show() 115 _dialog.show()
111 116