Mercurial > libervia-backend
diff sat_frontends/quick_frontend/quick_app.py @ 3204:fc2bea41e402
quick frontend(app): new `QuickApp.profileConnected` method
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 06 Mar 2020 18:19:03 +0100 |
parents | 65d89a339dd3 |
children | f3c99e96ac03 |
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_app.py Fri Mar 06 18:19:03 2020 +0100 +++ b/sat_frontends/quick_frontend/quick_app.py Fri Mar 06 18:19:03 2020 +0100 @@ -90,6 +90,8 @@ def _plug_profile_isconnected(self, connected): self.connected = connected + if connected: + self.host.profileConnected(self.profile) self.bridge.asyncGetParamA( "autodisconnect", "Connection", @@ -663,6 +665,14 @@ if not self._plugs_in_progress: self.contact_lists.lockUpdate(False) + def profileConnected(self, profile): + """Called when a plugged profile is connected + + it is called independently of profilePlugged (may be called before or after + profilePlugged) + """ + pass + def connect(self, profile, callback=None, errback=None): if not callback: callback = lambda __: None @@ -742,6 +752,7 @@ # A mechanism similar to sync should be available # on a per-profile basis self.sync = True + self.profileConnected(profile) def disconnectedHandler(self, profile): """called when the connection is closed"""