comparison frontends/src/primitivus/xmlui.py @ 641:49587e170f53

core: added the security_limit to setParam - params with a security greater than security_limit can not be modified - special value: security_limit < 0 disable the check (all params can be modified)
author souliane <souliane@mailoo.org>
date Sat, 07 Sep 2013 02:03:17 +0200
parents 06f44f797a1b
children 56f8a9c99194
comparison
equal deleted inserted replaced
640:8211b462af6b 641:49587e170f53
31 data = [] 31 data = []
32 for child in node.childNodes: 32 for child in node.childNodes:
33 if child.nodeType == child.TEXT_NODE: 33 if child.nodeType == child.TEXT_NODE:
34 data.append(child.wholeText) 34 data.append(child.wholeText)
35 return u"".join(data) 35 return u"".join(data)
36
36 37
37 class Pairs(urwid.WidgetWrap): 38 class Pairs(urwid.WidgetWrap):
38 39
39 def __init__(self, weight_0='1', weight_1='1'): 40 def __init__(self, weight_0='1', weight_1='1'):
40 self.idx = 0 41 self.idx = 0
272 for ctrl in self.param_changed: 273 for ctrl in self.param_changed:
273 if isinstance(ctrl, urwid.CheckBox): 274 if isinstance(ctrl, urwid.CheckBox):
274 value = "true" if ctrl.get_state() else "false" 275 value = "true" if ctrl.get_state() else "false"
275 else: 276 else:
276 value = ctrl.get_edit_text() 277 value = ctrl.get_edit_text()
277 self.host.bridge.setParam(ctrl._param_name, value, ctrl._param_category, profile_key = self.host.profile) 278 self.host.bridge.setParam(ctrl._param_name, value, ctrl._param_category,
279 profile_key=self.host.profile)
278 self.host.removeWindow() 280 self.host.removeWindow()