From 49c15eb9c91aee5f318aee040c72eca8bcf92253 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 26 Apr 2001 23:36:15 +0000 Subject: Replace "<" by "<=" in the comparison for due dates against the current 2001-04-26 Federico Mena Quintero * gui/calendar-model.c (get_is_overdue): Replace "<" by "<=" in the comparison for due dates against the current time. This makes tasks appear immediately as red when you click Now in the due date popup field. This is not a complete solution to the more general problem of tasks staying the same color even if they become overdue while the task list remains the same on the screen. This has been logged as bug #2399. svn path=/trunk/; revision=9606 --- calendar/gui/calendar-model.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'calendar/gui/calendar-model.c') diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index f75499f4da..b9c11e16ef 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -603,11 +603,14 @@ get_is_overdue (CalComponent *comp) goto out; } - /* Third, are we overdue as of right now? */ + /* Third, are we overdue as of right now? We use <= in the + * comparison below so that the table entries change color + * immediately. + */ t = icaltime_as_timet (*dt.value); - if (t < time (NULL)) + if (t <= time (NULL)) retval = TRUE; else retval = FALSE; -- cgit v1.2.3