aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-06-27 08:38:55 +0000
committerFrederic Culot <calcurse@culot.org>2009-06-27 08:38:55 +0000
commite36039dd6c1f5107ddc4ccafdf47ecefd4e24aaa (patch)
tree9010219c3a734cf00b26ab5b06ac7379f3eac2dc /src
parent0f38502d5951b1631380e16f75bdf94f62649f2c (diff)
downloadcalcurse-e36039dd6c1f5107ddc4ccafdf47ecefd4e24aaa.tar.gz
calcurse-e36039dd6c1f5107ddc4ccafdf47ecefd4e24aaa.zip
Do not export completed tasks.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/io.c8
1 files changed, 7 insertions, 1 deletions
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);
}