diff src/browser/sat_browser/menu.py @ 665:6a8a1103ad10 frontends_multi_profiles

browser_side: OTR uses 'profilePlugged', 'disconnect' and 'gotMenus' listeners
author souliane <souliane@mailoo.org>
date Tue, 03 Mar 2015 22:31:54 +0100
parents 40c72f3b7638
children a8fddccf5b84
line wrap: on
line diff
--- a/src/browser/sat_browser/menu.py	Tue Mar 03 19:00:21 2015 +0100
+++ b/src/browser/sat_browser/menu.py	Tue Mar 03 22:31:54 2015 +0100
@@ -88,13 +88,7 @@
     def onDisconnect(self):
         def confirm_cb(answer):
             if answer:
-                # FIXME: are we sure the triggers finished their jobs when the backend disconnect?
-                # FIXME: disconnection on timeout is not handled yet...
-                for plugin in self.host.plugins.values():
-                    if hasattr(plugin, 'profileDisconnected'):
-                        plugin.profileDisconnected()
-                log.info("disconnection")
-                self.host.bridge.call('disconnect', None)
+                self.host.disconnect(C.PROF_KEY_NONE)
         _dialog = dialog.ConfirmDialog(confirm_cb, text="Do you really want to disconnect ?")
         _dialog.show()