From faac62cfd29e1ba00c97338f8d5e3d957457a996 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 19 Dec 2012 23:22:10 +0100 Subject: [PATCH] quick frontend: asyncConnect is now used, to be sure that roster is available before continuing profile plugging --- frontends/src/quick_frontend/quick_app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index 92412e7f..ef804ca7 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -149,8 +149,11 @@ class QuickApp(object): def plug_profile_4(self, watched, autoconnect, profile): if autoconnect and not self.bridge.isConnected(profile): #Does the user want autoconnection ? - self.bridge.connect(profile) - + self.bridge.asyncConnect(profile, callback=lambda: self.plug_profile_5(watched, autoconnect, profile), errback=lambda ignore: error(_('Error during autoconnection'))) + else: + self.plug_profile_5(watched, autoconnect, profile) + + def plug_profile_5(self, watched, autoconnect, profile): self.profiles[profile]['watched'] = watched.split() #TODO: put this in a plugin ## misc ##