Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
1033:d87aa6bdb0b4 | 1034:5197600a1e13 |
---|---|
316 self.editBar = EditBar(self) | 316 self.editBar = EditBar(self) |
317 self.menu_roller = self._buildMenuRoller() | 317 self.menu_roller = self._buildMenuRoller() |
318 self.main_widget = sat_widgets.FocusFrame(self.center_part, header=self.menu_roller, footer=self.editBar, focus_part='footer') | 318 self.main_widget = sat_widgets.FocusFrame(self.center_part, header=self.menu_roller, footer=self.editBar, focus_part='footer') |
319 return self.main_widget | 319 return self.main_widget |
320 | 320 |
321 def plug_profile(self, profile_key='@DEFAULT@'): | 321 def plug_profile_1(self, profile_key='@DEFAULT@'): |
322 self.loop.widget = self._buildMainWidget() | 322 self.loop.widget = self._buildMainWidget() |
323 self.redraw() | 323 self.redraw() |
324 QuickApp.plug_profile(self, profile_key) | 324 QuickApp.plug_profile_1(self, profile_key) |
325 | 325 |
326 def removePopUp(self, widget=None): | 326 def removePopUp(self, widget=None): |
327 "Remove current pop-up, and if there is other in queue, show it" | 327 "Remove current pop-up, and if there is other in queue, show it" |
328 self.loop.widget = self.main_widget | 328 self.loop.widget = self.main_widget |
329 next_popup = self.notBar.getNextPopup() | 329 next_popup = self.notBar.getNextPopup() |
453 # action was a one shot, nothing to do | 453 # action was a one shot, nothing to do |
454 pass | 454 pass |
455 elif "xmlui" in data: | 455 elif "xmlui" in data: |
456 ui = XMLUI(self, xml_data=data['xmlui']) | 456 ui = XMLUI(self, xml_data=data['xmlui']) |
457 ui.show() | 457 ui.show() |
458 elif "authenticated_profile" in data: | |
459 assert("caller" in data) | |
460 if data["caller"] == "profile_manager": | |
461 assert(isinstance(self.main_widget, ProfileManager)) | |
462 self.main_widget.getXMPPParams(data['authenticated_profile']) | |
463 elif data["caller"] == "plug_profile": | |
464 self.plug_profile_1(data['authenticated_profile']) | |
465 else: | |
466 raise NotImplementedError | |
458 else: | 467 else: |
459 self.showPopUp(sat_widgets.Alert(_("Error"), _(u"Unmanaged action result"), ok_cb=self.removePopUp)) | 468 self.showPopUp(sat_widgets.Alert(_("Error"), _(u"Unmanaged action result"), ok_cb=self.removePopUp)) |
460 | 469 |
461 def action_eb(failure): | 470 def action_eb(failure): |
462 self.showPopUp(sat_widgets.Alert(_("Error"), unicode(failure), ok_cb=self.removePopUp)) | 471 self.showPopUp(sat_widgets.Alert(_("Error"), unicode(failure), ok_cb=self.removePopUp)) |