aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-model.c')
-rw-r--r--calendar/gui/calendar-model.c29
1 files changed, 28 insertions, 1 deletions
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;