Use a separate field for the completed status

Add a new field that indicates whether a todo item is completed or not
instead of encoding completed todo items by negative priorities.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2016-01-17 22:46:24 +01:00
parent 1a4bf2b0a2
commit beea88e5fe
6 changed files with 40 additions and 43 deletions

View File

@@ -311,7 +311,7 @@ static void pcal_export_todo(FILE * stream)
fputs("#\n# Todos\n#\n", stream);
LLIST_FOREACH(&todolist, i) {
struct todo *todo = LLIST_TS_GET_DATA(i);
if (todo->id < 0) /* completed items */
if (todo->completed)
continue;
fputs("note all ", stream);