From e36039dd6c1f5107ddc4ccafdf47ecefd4e24aaa Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sat, 27 Jun 2009 08:38:55 +0000 Subject: Do not export completed tasks. --- ChangeLog | 4 ++++ src/io.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index df7068b..3cf0ba2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-27 Frederic Culot + + * src/io.c: do not export completed tasks + 2009-06-26 Frederic Culot * src/args.c: do not print todo items twice if -d and -t flags are diff --git a/src/io.c b/src/io.c index bb4a8fd..673020a 100755 --- a/src/io.c +++ b/src/io.c @@ -1,4 +1,4 @@ -/* $calcurse: io.c,v 1.62 2009/06/23 08:11:07 culot Exp $ */ +/* $calcurse: io.c,v 1.63 2009/06/27 08:38:56 culot Exp $ */ /* * Calcurse - text-based organizer @@ -635,6 +635,9 @@ ical_export_todo (FILE *stream) for (i = todolist; i != 0; i = i->next) { + if (i->id < 0) /* completed items */ + continue; + (void)fprintf (stream, "BEGIN:VTODO\n"); (void)fprintf (stream, "PRIORITY:%d\n", i->id); (void)fprintf (stream, "SUMMARY:%s\n", i->mesg); @@ -650,6 +653,9 @@ pcal_export_todo (FILE *stream) (void)fprintf (stream, "#\n# Todos\n#\n"); for (i = todolist; i != 0; i = i->next) { + if (i->id < 0) /* completed items */ + continue; + (void)fprintf (stream, "note all "); (void)fprintf (stream, "%d. %s\n", i->id, i->mesg); } -- cgit v1.2.3-70-g09d2