Mercurial > libervia-backend
comparison frontends/src/wix/xmlui.py @ 865:3ee2ec7ec010
core (xmlui), frontends: handling of "text" type in params xml + bug fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 25 Feb 2014 23:01:26 +0100 |
parents | 1fe00f0c9a91 |
children | 75f3b3b430ff |
comparison
equal
deleted
inserted
replaced
864:241f6baa6687 | 865:3ee2ec7ec010 |
---|---|
22 from sat.core.i18n import _ | 22 from sat.core.i18n import _ |
23 import wx | 23 import wx |
24 from logging import debug, info, warning, error | 24 from logging import debug, info, warning, error |
25 from sat.tools.jid import JID | 25 from sat.tools.jid import JID |
26 from sat_frontends.tools import xmlui | 26 from sat_frontends.tools import xmlui |
27 from sat_frontends.constants import Const | |
27 | 28 |
28 | 29 |
29 class EventWidget(object): | 30 class EventWidget(object): |
30 """ Used to manage change event of widgets """ | 31 """ Used to manage change event of widgets """ |
31 | 32 |
278 ###events | 279 ###events |
279 | 280 |
280 def onParamChange(self, ctrl): | 281 def onParamChange(self, ctrl): |
281 super(XMLUI, self).onParamChange(ctrl) | 282 super(XMLUI, self).onParamChange(ctrl) |
282 ### FIXME # Some hacks for better presentation, should be generic # FIXME ### | 283 ### FIXME # Some hacks for better presentation, should be generic # FIXME ### |
283 if (ctrl._param_category, ctrl._param_name) == ('Connection', 'JabberID'): | 284 param_name = ctrl._xmlui_name.split(Const.SAT_PARAM_SEPARATOR)[1] |
285 if (ctrl._param_category, param_name) == ('Connection', 'JabberID'): | |
284 domain = JID(ctrl._xmluiGetValue()).domain | 286 domain = JID(ctrl._xmluiGetValue()).domain |
285 for widget in (ctl['control'] for ctl in self.ctrl_list.values()): | 287 for widget in (ctl['control'] for ctl in self.ctrl_list.values()): |
286 if (widget._param_category, widget._param_name) == ('Connection', 'Server'): | 288 if (widget._param_category, widget._param_name) == ('Connection', 'Server'): |
287 widget.SetValue(domain) | 289 widget.SetValue(domain) |
288 break | 290 break |