Mercurial > libervia-web
comparison 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 |
comparison
equal
deleted
inserted
replaced
664:8449a5db0602 | 665:6a8a1103ad10 |
---|---|
86 self.host.setSelected(web_widget) | 86 self.host.setSelected(web_widget) |
87 | 87 |
88 def onDisconnect(self): | 88 def onDisconnect(self): |
89 def confirm_cb(answer): | 89 def confirm_cb(answer): |
90 if answer: | 90 if answer: |
91 # FIXME: are we sure the triggers finished their jobs when the backend disconnect? | 91 self.host.disconnect(C.PROF_KEY_NONE) |
92 # FIXME: disconnection on timeout is not handled yet... | |
93 for plugin in self.host.plugins.values(): | |
94 if hasattr(plugin, 'profileDisconnected'): | |
95 plugin.profileDisconnected() | |
96 log.info("disconnection") | |
97 self.host.bridge.call('disconnect', None) | |
98 _dialog = dialog.ConfirmDialog(confirm_cb, text="Do you really want to disconnect ?") | 92 _dialog = dialog.ConfirmDialog(confirm_cb, text="Do you really want to disconnect ?") |
99 _dialog.show() | 93 _dialog.show() |
100 | 94 |
101 def onSocialContract(self): | 95 def onSocialContract(self): |
102 _frame = Frame('contrat_social.html') | 96 _frame = Frame('contrat_social.html') |