[evolution] I#1712 - Tasks: Correct overdue calculation for DATE value type
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#1712 - Tasks: Correct overdue calculation for DATE value type
- Date: Wed, 24 Nov 2021 16:01:22 +0000 (UTC)
commit 46fb2d9312cfc3683cecac0550996abb71fc7a8d
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 24 17:00:41 2021 +0100
I#1712 - Tasks: Correct overdue calculation for DATE value type
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1712
src/calendar/gui/e-cal-model-tasks.c | 4 +---
src/calendar/gui/e-to-do-pane.c | 5 +++--
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/calendar/gui/e-cal-model-tasks.c b/src/calendar/gui/e-cal-model-tasks.c
index 81450cf6d6..322f7ed5ea 100644
--- a/src/calendar/gui/e-cal-model-tasks.c
+++ b/src/calendar/gui/e-cal-model-tasks.c
@@ -332,10 +332,8 @@ get_due_status (ECalModelTasks *model,
g_object_unref (due_tt);
g_object_unref (prop);
- if (cmp < 0)
+ if (cmp <= 0)
return E_CAL_MODEL_TASKS_DUE_OVERDUE;
- else if (cmp == 0)
- return E_CAL_MODEL_TASKS_DUE_TODAY;
else
return E_CAL_MODEL_TASKS_DUE_FUTURE;
} else {
diff --git a/src/calendar/gui/e-to-do-pane.c b/src/calendar/gui/e-to-do-pane.c
index a1faffd69e..e537aeccd6 100644
--- a/src/calendar/gui/e-to-do-pane.c
+++ b/src/calendar/gui/e-to-do-pane.c
@@ -222,7 +222,8 @@ etdp_date_time_to_string (const ECalComponentDateTime *dt,
etdp_itt_to_zone (*out_itt, e_cal_component_datetime_get_tzid (dt), client, default_zone);
- is_overdue = is_task && etdp_create_date_mark (*out_itt) < today_date_mark;
+ is_overdue = is_task && (etdp_create_date_mark (*out_itt) < today_date_mark ||
+ (i_cal_time_is_date (*out_itt) && etdp_create_date_mark (*out_itt) <= today_date_mark));
if (i_cal_time_is_date (*out_itt) && !is_overdue)
return NULL;
@@ -903,7 +904,7 @@ etdp_get_comp_colors (EToDoPane *to_do_pane,
now = i_cal_time_new_current_with_zone (default_zone);
- if ((is_date && i_cal_time_compare_date_only (itt, now) < 0) ||
+ if ((is_date && i_cal_time_compare_date_only (itt, now) <= 0) ||
(!is_date && i_cal_time_compare (itt, now) <= 0)) {
bgcolor = to_do_pane->priv->overdue_color;
} else if (out_nearest_due) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]