aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@src.gnome.org>2000-08-12 12:51:59 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-12 12:51:59 +0800
commit5452537dd8e38b83ecf0f1fa422c77842638de93 (patch)
tree92fcc82d235e1bf7dbb94d1a1087ecd6cf82eef4 /calendar
parent7d87d79a05c34b48f2fed39ec1e69b292271e5a7 (diff)
downloadgsoc2013-evolution-5452537dd8e38b83ecf0f1fa422c77842638de93.tar
gsoc2013-evolution-5452537dd8e38b83ecf0f1fa422c77842638de93.tar.gz
gsoc2013-evolution-5452537dd8e38b83ecf0f1fa422c77842638de93.tar.bz2
gsoc2013-evolution-5452537dd8e38b83ecf0f1fa422c77842638de93.tar.lz
gsoc2013-evolution-5452537dd8e38b83ecf0f1fa422c77842638de93.tar.xz
gsoc2013-evolution-5452537dd8e38b83ecf0f1fa422c77842638de93.tar.zst
gsoc2013-evolution-5452537dd8e38b83ecf0f1fa422c77842638de93.zip
Sync - Federico
svn path=/trunk/; revision=4769
Diffstat (limited to 'calendar')
-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;