Mercurial > libervia-backend
comparison frontends/src/wix/profile_manager.py @ 1106:e2e1e27a3680
frontends: XMLUI refactoring + dialogs:
- there are now XMLUIPanel and XMLUIDialog both inheriting from XMLUIBase
- following dialogs are managed:
- MessageDialog
- NoteDialog
- ConfirmDialog
- FileDialog
- XMLUI creation is now made using xmlui.create(...) instead of instanciating directly XMLUI
- classes must be registed in frontends
- "parent" attribute renamed to "_xmlui_parent" to avoid name conflicts with frontends toolkits
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 13 Aug 2014 14:48:49 +0200 |
parents | 8e0072754413 |
children |
comparison
equal
deleted
inserted
replaced
1105:018bdd687747 | 1106:e2e1e27a3680 |
---|---|
22 from sat.core.i18n import _ | 22 from sat.core.i18n import _ |
23 from sat_frontends.primitivus.constants import Const as C | 23 from sat_frontends.primitivus.constants import Const as C |
24 import wx | 24 import wx |
25 from sat.core.log import getLogger | 25 from sat.core.log import getLogger |
26 log = getLogger(__name__) | 26 log = getLogger(__name__) |
27 from sat.tools.jid import JID | |
28 | 27 |
29 | 28 |
30 NO_SELECTION_ENTRY = ' ' | 29 NO_SELECTION_ENTRY = ' ' |
31 | 30 |
32 | 31 |
145 if profile_name == NO_SELECTION_ENTRY: | 144 if profile_name == NO_SELECTION_ENTRY: |
146 self.selected_profile = NO_SELECTION_ENTRY | 145 self.selected_profile = NO_SELECTION_ENTRY |
147 return | 146 return |
148 if self.selected_profile: | 147 if self.selected_profile: |
149 self.profile_name.SetValue(self.selected_profile) | 148 self.profile_name.SetValue(self.selected_profile) |
150 self.host.profile = profile_name # FIXME: EXTREMELY DIRTY, needed for sat_frontends.tools.xmlui.XMLUI._xmluiLaunchAction | 149 self.host.profile = profile_name # FIXME: EXTREMELY DIRTY, needed for sat_frontends.tools.xmlui.XMLUI.submit |
151 self.host.launchAction(C.AUTHENTICATE_PROFILE_ID, {'caller': 'profile_manager'}, profile_key=profile_name) | 150 self.host.launchAction(C.AUTHENTICATE_PROFILE_ID, {'caller': 'profile_manager'}, profile_key=profile_name) |
152 | 151 |
153 def onConnectButton(self, event): | 152 def onConnectButton(self, event): |
154 """Called when the Connect button is pressed""" | 153 """Called when the Connect button is pressed""" |
155 name = self.profile_name.GetValue() | 154 name = self.profile_name.GetValue() |