From 6db2c0fb510e4a3d4ba22bd9e2051d6380422ff7 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Sun, 13 Aug 2000 01:45:40 +0000 Subject: Sync - Federico svn path=/trunk/; revision=4789 --- calendar/ChangeLog | 5 +++++ calendar/gui/calendar-model.c | 19 ++++++++----------- 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 + + * gui/calendar-model.c (get_is_overdue): Finished implementing. + (calendar_model_value_at): Handle the color field. + 2000-08-11 Seth Alves * 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); -- cgit