comparison src/browser/sat_browser/menu.py @ 547:dd43132684b9

browser_side: fixes bug at profile disconnection
author souliane <souliane@mailoo.org>
date Wed, 10 Sep 2014 15:50:42 +0200
parents 9bfd71e2b35c
children b07f0fe2763a
comparison
equal deleted inserted replaced
546:ff03fdb5215d 547:dd43132684b9
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? 107 # FIXME: are we sure the triggers finished their jobs when the backend disconnect?
108 # FIXME: disconnection on timeout is not handled yet... 108 # FIXME: disconnection on timeout is not handled yet...
109 for plugin in self.plugins.values(): 109 for plugin in self.host.plugins.values():
110 if hasattr(plugin, 'profileConnected'): 110 if hasattr(plugin, 'profileDisconnected'):
111 plugin.profileDisconnected() 111 plugin.profileDisconnected()
112 log.info("disconnection") 112 log.info("disconnection")
113 self.host.bridge.call('disconnect', None) 113 self.host.bridge.call('disconnect', None)
114 _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 ?")
115 _dialog.show() 115 _dialog.show()