comparison frontends/src/wix/xmlui.py @ 1089:8e0072754413

core, plugins, stdui, frontends: fixes handling of "Force server" and "Force port" parameters: - do not save a "guessed" value, they must stay empty until the user explicitely sets them - add constant XMPP_C2S_PORT (default value 5222)
author souliane <souliane@mailoo.org>
date Mon, 23 Jun 2014 10:23:13 +0200
parents b29452cab50b
children e2e1e27a3680
comparison
equal deleted inserted replaced
1088:b29452cab50b 1089:8e0072754413
313 313
314 ###events 314 ###events
315 315
316 def onParamChange(self, ctrl): 316 def onParamChange(self, ctrl):
317 super(XMLUI, self).onParamChange(ctrl) 317 super(XMLUI, self).onParamChange(ctrl)
318 ### FIXME # Some hacks for better presentation, should be generic # FIXME ###
319 param_name = ctrl._xmlui_name.split(Const.SAT_PARAM_SEPARATOR)[1]
320 if (ctrl._param_category, param_name) == ('Connection', 'JabberID'):
321 domain = JID(ctrl._xmluiGetValue()).domain
322 for widget in (ctl['control'] for ctl in self.ctrl_list.values()):
323 if (widget._param_category, widget._param_name) == ('Connection', C.FORCE_SERVER_PARAM):
324 widget.SetValue(domain)
325 break
326 318
327 def onFormSubmitted(self, event): 319 def onFormSubmitted(self, event):
328 """Called when submit button is clicked""" 320 """Called when submit button is clicked"""
329 button = event.GetEventObject() 321 button = event.GetEventObject()
330 super(XMLUI, self).onFormSubmitted(button) 322 super(XMLUI, self).onFormSubmitted(button)