aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-09-11 12:39:11 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-09-11 12:39:11 +0800
commit009099a0bdd09c05b728e1c04e4583f4b6ef0344 (patch)
treea1e2ea8b06e8583f2f917841d044c124d13ef7af /calendar
parent2434c6811f23b80b9fb03e8e8ac21bdd28130c55 (diff)
downloadgsoc2013-evolution-009099a0bdd09c05b728e1c04e4583f4b6ef0344.tar
gsoc2013-evolution-009099a0bdd09c05b728e1c04e4583f4b6ef0344.tar.gz
gsoc2013-evolution-009099a0bdd09c05b728e1c04e4583f4b6ef0344.tar.bz2
gsoc2013-evolution-009099a0bdd09c05b728e1c04e4583f4b6ef0344.tar.lz
gsoc2013-evolution-009099a0bdd09c05b728e1c04e4583f4b6ef0344.tar.xz
gsoc2013-evolution-009099a0bdd09c05b728e1c04e4583f4b6ef0344.tar.zst
gsoc2013-evolution-009099a0bdd09c05b728e1c04e4583f4b6ef0344.zip
Only set the due date only if it exists
2000-09-10 JP Rosevear <jpr@helixcode.com> * conduits/todo/todo-conduit.c (comp_from_remote_record): Only set the due date only if it exists svn path=/trunk/; revision=5310
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/conduits/todo/todo-conduit.c14
2 files changed, 15 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d66b3674f0..357c0796ce 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,10 @@
2000-09-10 JP Rosevear <jpr@helixcode.com>
+ * conduits/todo/todo-conduit.c (comp_from_remote_record): Only
+ set the due date only if it exists
+
+2000-09-10 JP Rosevear <jpr@helixcode.com>
+
* gui/calendar-model.c (get_is_complete): Relying on the status
field is somewhat faulty since it is related to group scheduling
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index c2e0eddfb0..6f1fd165f8 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -407,10 +407,16 @@ comp_from_remote_record (GnomePilotConduitStandardAbs *conduit,
cal_component_set_percent (comp, &percent);
}
- due = icaltime_from_timet (mktime (& todo.due), FALSE, FALSE);
- dt.value = &due;
- cal_component_set_due (comp, &dt);
-
+ /* FIX ME This is a bit hackish, how else can we tell if there is
+ * no due date set?
+ */
+ if (todo.due.tm_sec || todo.due.tm_min || todo.due.tm_hour
+ || todo.due.tm_mday || todo.due.tm_mon || todo.due.tm_year) {
+ due = icaltime_from_timet (mktime (&todo.due), FALSE, FALSE);
+ dt.value = &due;
+ cal_component_set_due (comp, &dt);
+ }
+
cal_component_set_priority (comp, &todo.priority);
cal_component_set_transparency (comp, CAL_COMPONENT_TRANSP_NONE);