diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 1 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 16 |
3 files changed, 18 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 3dd356e39d..fdba46e897 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,12 @@ 2000-12-19 JP Rosevear <jpr@helixcode.com> + * conduits/calendar/calendar-conduit.c: Remove pointless comment + + * conduits/todo/todo-conduit.c (is_empty_time): add utility function + (comp_from_remote_record): use it + +2000-12-19 JP Rosevear <jpr@helixcode.com> + * conduits/calendar/calendar-conduit.c (local_record_from_comp): Convert cal component strings to pilot character set (comp_from_remote_record): vice versa diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 45f4aa0a08..009b508399 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -248,7 +248,6 @@ get_pilot_day (icalrecurrencetype_weekday wd) } } -/* FIX ME Is there a better way to see if no start time set? */ static gboolean is_empty_time (struct tm time) { diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 09676cee73..7db0f39861 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -206,6 +206,16 @@ map_name (EToDoConduitContext *ctxt) return filename; } +static gboolean +is_empty_time (struct tm time) +{ + if (time.tm_sec || time.tm_min || time.tm_hour + || time.tm_mday || time.tm_mon || time.tm_year) + return FALSE; + + return TRUE; +} + static GList * next_changed_item (EToDoConduitContext *ctxt, GList *changes) { @@ -434,11 +444,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, cal_component_set_percent (comp, &percent); } - /* 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) { + if (is_empty_time (todo.due)) { due = icaltime_from_timet (mktime (&todo.due), FALSE, TRUE); dt.value = &due; cal_component_set_due (comp, &dt); |