Mercurial > libervia-backend
changeset 2894:c7c52c0dc13a
core, quick_frontend(app): fixed connected signal handling
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 07 Apr 2019 20:55:27 +0200 |
parents | 7c8773723200 |
children | 1a23547f95fd |
files | sat/bridge/bridge_constructor/bridge_template.ini sat/bridge/dbus_bridge.py sat/bridge/pb.py sat/core/xmpp.py sat_frontends/quick_frontend/quick_app.py |
diffstat | 5 files changed, 10 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/bridge/bridge_constructor/bridge_template.ini Sun Apr 07 18:50:13 2019 +0200 +++ b/sat/bridge/bridge_constructor/bridge_template.ini Sun Apr 07 20:55:27 2019 +0200 @@ -10,8 +10,8 @@ category=core sig_in=ss doc=Connection is done -doc_param_0=%(doc_profile)s -doc_param_1=jid_s: the JID that we were assigned by the server, as the resource might differ from the JID we asked for. +doc_param_0=jid_s: the JID that we were assigned by the server, as the resource might differ from the JID we asked for. +doc_param_1=%(doc_profile)s [disconnected] type=signal
--- a/sat/bridge/dbus_bridge.py Sun Apr 07 18:50:13 2019 +0200 +++ b/sat/bridge/dbus_bridge.py Sun Apr 07 20:55:27 2019 +0200 @@ -140,7 +140,7 @@ @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, signature='ss') - def connected(self, profile, jid_s): + def connected(self, jid_s, profile): pass @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, @@ -698,8 +698,8 @@ def actionNew(self, action_data, id, security_limit, profile): self.dbus_bridge.actionNew(action_data, id, security_limit, profile) - def connected(self, profile, jid_s): - self.dbus_bridge.connected(profile, jid_s) + def connected(self, jid_s, profile): + self.dbus_bridge.connected(jid_s, profile) def contactDeleted(self, entity_jid, profile): self.dbus_bridge.contactDeleted(entity_jid, profile)
--- a/sat/bridge/pb.py Sun Apr 07 18:50:13 2019 +0200 +++ b/sat/bridge/pb.py Sun Apr 07 20:55:27 2019 +0200 @@ -141,8 +141,8 @@ def actionNew(self, action_data, id, security_limit, profile): self.sendSignal("actionNew", action_data, id, security_limit, profile) - def connected(self, profile, jid_s): - self.sendSignal("connected", profile, jid_s) + def connected(self, jid_s, profile): + self.sendSignal("connected", jid_s, profile) def contactDeleted(self, entity_jid, profile): self.sendSignal("contactDeleted", entity_jid, profile)
--- a/sat/core/xmpp.py Sun Apr 07 18:50:13 2019 +0200 +++ b/sat/core/xmpp.py Sun Apr 07 20:55:27 2019 +0200 @@ -259,10 +259,8 @@ self._connected_d.addCallback(self._disconnectionCb) self._connected_d.addErrback(self._disconnectionEb) - self.host_app.bridge.connected( - self.profile, unicode(self.jid) - ) # we send the signal to the clients - + # we send the signal to the clients + self.host_app.bridge.connected(self.jid.full(), self.profile) self.disco = SatDiscoProtocol(self) self.disco.setHandlerParent(self)
--- a/sat_frontends/quick_frontend/quick_app.py Sun Apr 07 18:50:13 2019 +0200 +++ b/sat_frontends/quick_frontend/quick_app.py Sun Apr 07 20:55:27 2019 +0200 @@ -682,7 +682,7 @@ # bridge signals hanlers - def connectedHandler(self, profile, jid_s): + def connectedHandler(self, jid_s, profile): """Called when the connection is made. @param jid_s (unicode): the JID that we were assigned by the server,