
cherokee at cherokee-project
Jun 10, 2011, 3:25 PM
Post #1 of 1
(142 views)
Permalink
|
|
[6758] CTK/trunk/CTK/Radio.py: Fixes the properties management code of CTK. RadioGroupCfg().
|
|
Revision: 6758 http://svn.cherokee-project.com/changeset/6758 Author: alo Date: 2011-06-11 00:25:49 +0200 (Sat, 11 Jun 2011) Log Message: ----------- Fixes the properties management code of CTK.RadioGroupCfg(). Modified Paths: -------------- CTK/trunk/CTK/Radio.py Modified: CTK/trunk/CTK/Radio.py =================================================================== --- CTK/trunk/CTK/Radio.py 2011-06-10 08:33:20 UTC (rev 6757) +++ CTK/trunk/CTK/Radio.py 2011-06-10 22:25:49 UTC (rev 6758) @@ -71,13 +71,17 @@ for o in options: val, desc = o - props = self.props.copy() - props['name'] = key - props['value'] = val + new_props = {} + new_props['name'] = key + new_props['value'] = val - self += RadioText (desc, props) + if 'checked' in self.props: + if self.props['checked'] == val: + new_props['checked'] = 1 + self += RadioText (desc, new_props) + class RadioText (Box): def __init__ (self, txt, props={}): Box.__init__ (self)
|