[POS-commit] r3324 - in kiwi/trunk: .
Johan Dahlin
jdahlin at async.com.br
Tue Apr 25 14:07:39 BRT 2006
Author: jdahlin
Date: Tue Apr 25 14:07:39 2006
New Revision: 3324
Modified:
kiwi/trunk/ChangeLog
kiwi/trunk/kiwi/ui/objectlist.py
Log:
2006-04-25 Ronaldo Maia <romaia at async.com.br>
reviewed by: jdahlin
* kiwi/ui/objectlist.py (Column.as_string): Use a slightly
different logic to convert to a string, fixes boolean radio
columns
Modified: kiwi/trunk/ChangeLog
==============================================================================
--- kiwi/trunk/ChangeLog (original)
+++ kiwi/trunk/ChangeLog Tue Apr 25 14:07:39 2006
@@ -1,3 +1,11 @@
+2006-04-25 Ronaldo Maia <romaia at async.com.br>
+
+ reviewed by: jdahlin
+
+ * kiwi/ui/objectlist.py (Column.as_string): Use a slightly
+ different logic to convert to a string, fixes boolean radio
+ columns
+
2006-04-25 Johan Dahlin <jdahlin at async.com.br>
* kiwi/environ.py: Add support for .gz and .bz2 compressed
Modified: kiwi/trunk/kiwi/ui/objectlist.py
==============================================================================
--- kiwi/trunk/kiwi/ui/objectlist.py (original)
+++ kiwi/trunk/kiwi/ui/objectlist.py Tue Apr 25 14:07:39 2006
@@ -222,14 +222,18 @@
self.sorted, self.order)
def as_string(self, data):
- if self.format_func:
- text = self.format_func(data)
- elif data is not None:
- conv = converter.get_converter(self.data_type)
+ data_type = self.data_type
+ if (self.format or
+ data_type == datetime.date or
+ data_type == datetime.datetime or
+ data_type == datetime.time):
+ conv = converter.get_converter(data_type)
text = conv.as_string(data, format=self.format or None)
+ elif self.format_func:
+ text = self.format_func(data)
else:
- text = ''
-
+ text = data
+
return text
def from_string(cls, data_string):
More information about the POS-commit
mailing list