commit 654035002e6f1e4d525418c8a0d24cb6a7ba6202
Author: Simon Guinot <simon@sequanux.org>
Date:   Tue Nov 11 22:25:04 2008 +0100

    doneDate (instead of creationDate) is a more interesting value for an achieved task.
    Display a short task header accordingly.

diff --git a/textrenderer.py b/textrenderer.py
index 101ebcb..f3ae192 100644
--- a/textrenderer.py
+++ b/textrenderer.py
@@ -8,11 +8,11 @@ Helper functions to render formated text on screen
 
 import colors as C
 
-TASK_LIST_FORMAT="%(id)-3s|%(title)-60s|%(urgency)-3s|%(status)-1s|%(creationDate)-19s"
+TASK_LIST_FORMAT="%(id)-3s|%(title)-60s|%(urgency)-3s|%(status)-1s|%(Date)-19s"
 
 class TextRenderer(object):
     def renderTaskListHeader(self, projectName):
-        line = TASK_LIST_FORMAT % dict(id="ID", title="Title", urgency="U", status="S", creationDate="Date")
+        line = TASK_LIST_FORMAT % dict(id="ID", title="Title", urgency="U", status="S", Date="Date")
         print
         print C.CYAN+projectName.center(90)+C.RESET
         print C.BOLD+line+C.RESET
@@ -31,9 +31,12 @@ class TextRenderer(object):
             title = title.ljust(maxLength) + "*"
 
         status = task.status[0].upper()
+        Date = task.creationDate
+
         if status=="S":
             status=C.BOLD+status+C.RESET
-        creationDate = task.creationDate
+        elif status=="D":
+            Date = C.RED+str(task.doneDate)+C.RESET
 
         if int(task.urgency)>75:
             urgency=C.RED+str(task.urgency)+" "+C.RESET
@@ -42,7 +45,7 @@ class TextRenderer(object):
         else:
             urgency=task.urgency
 
-        print TASK_LIST_FORMAT % dict(id=str(task.id), title=title, urgency=urgency, status=status, creationDate=creationDate)
+        print TASK_LIST_FORMAT % dict(id=str(task.id), title=title, urgency=urgency, status=status, Date=Date)
 
 
     def renderTaskDetails(self, task):

