Update of /cvsroot/todo-manager/todo-manager
In directory usw-pr-cvs1:/tmp/cvs-serv26400
Modified Files:
Tag: dev-bronze
interface.py
Log Message:
The task due date color stuff works again
Index: interface.py
===================================================================
RCS file: /cvsroot/todo-manager/todo-manager/Attic/interface.py,v
retrieving revision 1.1.2.30
retrieving revision 1.1.2.31
diff -u -d -r1.1.2.30 -r1.1.2.31
--- interface.py 1 Jun 2002 23:22:49 -0000 1.1.2.30
+++ interface.py 2 Jun 2002 21:12:25 -0000 1.1.2.31
@@ -511,6 +511,9 @@
tasklist.insert_text(i, 1, args[0])
tasklist.insert_object(i, 3, self.draw_finished_box)
elif command == "set_list_item_value":
+ # Get the tast format
+ col1, col2, font = self.get_task_format(args[0])
+
try:
col = {
"priority": 0,
@@ -526,8 +529,20 @@
row = self.get_listitem_index(args[0])
if args[1] in ("name", "duedate", "finisheddate"):
- self._taskList.insert_text(row, col, args[2])
+ if args[1] == "duedate":
+ # Redraw the name too
+ self._taskList.insert_text(row, 1, args[0], color=col1, selectcolor=col2,
+ font=font)
+
+ self._taskList.insert_text(row, col, args[2], color=col1, selectcolor=col2,
+ font=font)
else:
+ if args[1] in ("finished", "disablefinish"):
+ self._taskList.insert_text(row, 1, args[0], color=col1, selectcolor=col2,
+ font=font)
+ self._taskList.insert_text(row, 2, self._app.get_task_value(args[0], "DueDate"),
+ color=col1, selectcolor=col2, font=font)
+
func = {
"priority": self.draw_priority_box,
"finished": self.draw_finished_box,
@@ -559,6 +574,7 @@
duefont = (fs[0], fs[1], "bold")
task_due = app.is_task_due(name)[0]
+
# The task is due today
if task_due == 0:
col1 = duefg; col2 = selduefg
@@ -573,7 +589,7 @@
f = font
# Return the task color, selected task color, and task font
- return (col1, col2, font)
+ return (col1, col2, f)
def update_list(self):
tasklist = self._taskList
|