[POS-commit] r1306 - kiwi/trunk/kiwi
Johan Dahlin
jdahlin at async.com.br
Thu Sep 29 13:34:54 BRT 2005
Author: jdahlin
Date: Thu Sep 29 13:34:54 2005
New Revision: 1306
Modified:
kiwi/trunk/kiwi/utils.py
Log:
Implement prop_get
Modified: kiwi/trunk/kiwi/utils.py
==============================================================================
--- kiwi/trunk/kiwi/utils.py (original)
+++ kiwi/trunk/kiwi/utils.py Thu Sep 29 13:34:54 2005
@@ -131,6 +131,12 @@
value = func(value)
self._attributes[name] = value
+ def _get(self, name):
+ func = getattr(self, 'prop_get_%s' % name, None)
+ if callable(func) and func:
+ return func()
+ return self._attributes[name]
+
def get_attribute_names(self):
return self._attributes.keys()
@@ -143,7 +149,7 @@
def do_get_property(self, pspec):
prop_name = pspec.name.replace('-', '_')
- return self._attributes[prop_name]
+ return self._get(prop_name)
def gsignal(name, *args, **kwargs):
"""
More information about the POS-commit
mailing list