diff frontends/src/quick_frontend/quick_profile_manager.py @ 1489:039d96e131be

frontends: callback are now always used in QuickApp launchAction (before it was only used if validated is present): - actionManager is used by default (no callback provided) - in XMLUI, the dialog is closed before calling actionManager - if keys are not managed in resuling data, an exceptions is raised
author Goffi <goffi@goffi.org>
date Tue, 25 Aug 2015 14:41:42 +0200
parents 3265a2639182
children 1c5761cb1bdc
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_profile_manager.py	Tue Aug 25 14:22:21 2015 +0200
+++ b/frontends/src/quick_frontend/quick_profile_manager.py	Tue Aug 25 14:41:42 2015 +0200
@@ -96,9 +96,9 @@
         """
         assert self._autoconnect
 
-        def authenticate_cb(callback_id, data, profile):
+        def authenticate_cb(data, cb_id, profile):
 
-            if C.bool(data['validated']):
+            if C.bool(data.pop('validated', C.BOOL_FALSE)):
                 self._autoconnect_profiles.append(profile)
                 if len(self._autoconnect_profiles) == len(profile_keys):
                     # all the profiles have been validated
@@ -106,6 +106,7 @@
             else:
                 # a profile is not validated, we go to manual mode
                 self._autoconnect=False
+            self.host.actionManager(data, callback=authenticate_cb, profile=profile)
 
         for profile_key in profile_keys:
             profile = self.host.bridge.getProfileName(profile_key)