view.py
branchstable
changeset 7346 c6d8c3ce4a3e
parent 6931 0af44a38fe41
child 7670 6397a9051f65
--- a/view.py	Mon May 09 16:12:17 2011 +0200
+++ b/view.py	Mon May 09 17:42:28 2011 +0200
@@ -447,11 +447,14 @@
         rqlstdescr = self.cw_rset.syntax_tree().get_description(mainindex,
                                                                 translate)[0]
         labels = []
-        for colindex, label in enumerate(rqlstdescr):
-            # compute column header
-            if label == 'Any': # find a better label
-                label = ','.join(translate(et)
-                                 for et in self.cw_rset.column_types(colindex))
+        for colidx, label in enumerate(rqlstdescr):
+            try:
+                label = getattr(self, 'label_column_%s' % colidx)()
+            except AttributeError:
+                # compute column header
+                if label == 'Any': # find a better label
+                    label = ','.join(translate(et)
+                                     for et in self.cw_rset.column_types(colidx))
             labels.append(label)
         return labels