diff frontends/src/primitivus/primitivus @ 1034:5197600a1e13

quick_app, primitivus: update the connection mechanism to ask for non empty profile passwords
author souliane <souliane@mailoo.org>
date Wed, 07 May 2014 16:11:32 +0200
parents a836b6da2c5c
children 0a9986452bba
line wrap: on
line diff
--- a/frontends/src/primitivus/primitivus	Wed May 07 16:10:20 2014 +0200
+++ b/frontends/src/primitivus/primitivus	Wed May 07 16:11:32 2014 +0200
@@ -318,10 +318,10 @@
         self.main_widget = sat_widgets.FocusFrame(self.center_part, header=self.menu_roller, footer=self.editBar, focus_part='footer')
         return self.main_widget
 
-    def plug_profile(self, profile_key='@DEFAULT@'):
+    def plug_profile_1(self, profile_key='@DEFAULT@'):
         self.loop.widget = self._buildMainWidget()
         self.redraw()
-        QuickApp.plug_profile(self, profile_key)
+        QuickApp.plug_profile_1(self, profile_key)
 
     def removePopUp(self, widget=None):
         "Remove current pop-up, and if there is other in queue, show it"
@@ -455,6 +455,15 @@
             elif "xmlui" in data:
                 ui = XMLUI(self, xml_data=data['xmlui'])
                 ui.show()
+            elif "authenticated_profile" in data:
+                assert("caller" in data)
+                if data["caller"] == "profile_manager":
+                    assert(isinstance(self.main_widget, ProfileManager))
+                    self.main_widget.getXMPPParams(data['authenticated_profile'])
+                elif data["caller"] == "plug_profile":
+                    self.plug_profile_1(data['authenticated_profile'])
+                else:
+                    raise NotImplementedError
             else:
                 self.showPopUp(sat_widgets.Alert(_("Error"), _(u"Unmanaged action result"), ok_cb=self.removePopUp))