From 009099a0bdd09c05b728e1c04e4583f4b6ef0344 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 11 Sep 2000 04:39:11 +0000 Subject: Only set the due date only if it exists 2000-09-10 JP Rosevear * conduits/todo/todo-conduit.c (comp_from_remote_record): Only set the due date only if it exists svn path=/trunk/; revision=5310 --- calendar/conduits/todo/todo-conduit.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'calendar/conduits') 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); -- cgit v1.2.3