Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
1034:5197600a1e13 | 1035:c4c14480715a |
---|---|
101 | 101 |
102 self.postInit() | 102 self.postInit() |
103 | 103 |
104 self.Show() | 104 self.Show() |
105 | 105 |
106 def plug_profile(self, profile_key='@DEFAULT@'): | 106 def plug_profile_1(self, profile_key='@DEFAULT@'): |
107 """Hide profile panel then plug profile""" | 107 """Hide profile panel then plug profile""" |
108 log.debug (_('plugin profile %s' % profile_key)) | 108 log.debug (_('plugin profile %s' % profile_key)) |
109 self.profile_pan.Hide() | 109 self.profile_pan.Hide() |
110 self.contact_list.Show() | 110 self.contact_list.Show() |
111 self.sizer.Layout() | 111 self.sizer.Layout() |
112 for i in range(self.menuBar.GetMenuCount()): | 112 for i in range(self.menuBar.GetMenuCount()): |
113 self.menuBar.EnableTop(i, True) | 113 self.menuBar.EnableTop(i, True) |
114 super(MainWindow, self).plug_profile(profile_key) | 114 super(MainWindow, self).plug_profile_1(profile_key) |
115 | 115 |
116 def createMenus(self): | 116 def createMenus(self): |
117 log.info(_("Creating menus")) | 117 log.info(_("Creating menus")) |
118 connectMenu = wx.Menu() | 118 connectMenu = wx.Menu() |
119 connectMenu.Append(idCONNECT, _("&Connect CTRL-c"),_(" Connect to the server")) | 119 connectMenu.Append(idCONNECT, _("&Connect CTRL-c"),_(" Connect to the server")) |
237 # action was a one shot, nothing to do | 237 # action was a one shot, nothing to do |
238 pass | 238 pass |
239 elif "xmlui" in data: | 239 elif "xmlui" in data: |
240 log.debug (_("XML user interface received")) | 240 log.debug (_("XML user interface received")) |
241 XMLUI(self, xml_data = data['xmlui']) | 241 XMLUI(self, xml_data = data['xmlui']) |
242 elif "authenticated_profile" in data: | |
243 assert("caller" in data) | |
244 if data["caller"] == "profile_manager": | |
245 assert(self.profile_pan.IsShown()) | |
246 self.profile_pan.getXMPPParams(data['authenticated_profile']) | |
247 elif data["caller"] == "plug_profile": | |
248 self.plug_profile_1(data['authenticated_profile']) | |
249 else: | |
250 raise NotImplementedError | |
242 else: | 251 else: |
243 dlg = wx.MessageDialog(self, _(u"Unmanaged action result"), | 252 dlg = wx.MessageDialog(self, _(u"Unmanaged action result"), |
244 _('Error'), | 253 _('Error'), |
245 wx.OK | wx.ICON_ERROR | 254 wx.OK | wx.ICON_ERROR |
246 ) | 255 ) |