aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/calendar-model.c19
2 files changed, 13 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 5850854e52..0834181958 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-12 Federico Mena Quintero <federico@helixcode.com>
+
+ * gui/calendar-model.c (get_is_overdue): Finished implementing.
+ (calendar_model_value_at): Handle the color field.
+
2000-08-11 Seth Alves <alves@hungry.com>
* cal-util/cal-component.c (cal_component_get_pilot_id):
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
index 4e47a90f25..daa85ddcd6 100644
--- a/calendar/gui/calendar-model.c
+++ b/calendar/gui/calendar-model.c
@@ -595,7 +595,10 @@ get_is_overdue (CalComponent *comp)
t = time_from_icaltimetype (*dt.value);
- /* FIXME */
+ if (dt < time (NULL))
+ retval = TRUE;
+ else
+ retval = FALSE;
}
out:
@@ -679,18 +682,12 @@ calendar_model_value_at (ETableModel *etm, int col, int row)
case CAL_COMPONENT_FIELD_OVERDUE:
return GINT_TO_POINTER (get_is_overdue (comp));
- if (ico->percent != 100
- && ico->dtend > 0
- && ico->dtend < time (NULL))
- return GINT_TO_POINTER (TRUE);
- return GINT_TO_POINTER (FALSE);
- case ICAL_OBJECT_FIELD_COLOR:
- if (ico->percent != 100
- && ico->dtend > 0
- && ico->dtend < time (NULL))
+ case CAL_COMPONENT_FIELD_COLOR:
+ if (get_is_overdue (comp))
return "red";
- return NULL;
+ else
+ return NULL;
default:
g_message ("calendar_model_value_at(): Requested invalid column %d", col);