diff frontends/src/wix/main_window.py @ 1035:c4c14480715a

wix: update the connection mechanism to ask for non empty profile passwords
author souliane <souliane@mailoo.org>
date Wed, 07 May 2014 18:16:15 +0200
parents 5a6354ff468c
children b2b9c184033f
line wrap: on
line diff
--- a/frontends/src/wix/main_window.py	Wed May 07 16:11:32 2014 +0200
+++ b/frontends/src/wix/main_window.py	Wed May 07 18:16:15 2014 +0200
@@ -103,7 +103,7 @@
 
         self.Show()
 
-    def plug_profile(self, profile_key='@DEFAULT@'):
+    def plug_profile_1(self, profile_key='@DEFAULT@'):
         """Hide profile panel then plug profile"""
         log.debug (_('plugin profile %s' % profile_key))
         self.profile_pan.Hide()
@@ -111,7 +111,7 @@
         self.sizer.Layout()
         for i in range(self.menuBar.GetMenuCount()):
             self.menuBar.EnableTop(i, True)
-        super(MainWindow, self).plug_profile(profile_key)
+        super(MainWindow, self).plug_profile_1(profile_key)
 
     def createMenus(self):
         log.info(_("Creating menus"))
@@ -239,6 +239,15 @@
             elif "xmlui" in data:
                 log.debug (_("XML user interface received"))
                 XMLUI(self, xml_data = data['xmlui'])
+            elif "authenticated_profile" in data:
+                assert("caller" in data)
+                if data["caller"] == "profile_manager":
+                    assert(self.profile_pan.IsShown())
+                    self.profile_pan.getXMPPParams(data['authenticated_profile'])
+                elif data["caller"] == "plug_profile":
+                    self.plug_profile_1(data['authenticated_profile'])
+                else:
+                    raise NotImplementedError
             else:
                 dlg = wx.MessageDialog(self, _(u"Unmanaged action result"),
                                        _('Error'),