From 5452537dd8e38b83ecf0f1fa422c77842638de93 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Sat, 12 Aug 2000 04:51:59 +0000 Subject: Sync - Federico svn path=/trunk/; revision=4769 --- calendar/gui/calendar-model.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 8988748929..4e47a90f25 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -567,12 +567,39 @@ get_is_overdue (CalComponent *comp) cal_component_get_due (comp, &dt); + /* First, do we have a due date? */ + if (!dt.value) retval = FALSE; else { - + struct icaltimetype *completed; + time_t t; + + /* Second, is it already completed? */ + + cal_component_get_completed (comp, &completed); + + if (completed) { + retval = FALSE; + + cal_component_free_icaltimetype (completed); + goto out; + } + + /* Third, are we overdue as of right now? + * + * FIXME: should we check the PERCENT as well? If it is at 100% + * but the COMPLETED property is not set, is the component + * really overdue? + **/ + + t = time_from_icaltimetype (*dt.value); + + /* FIXME */ } + out: + cal_component_free_datetime (&dt); return retval; -- cgit v1.2.3