aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@src.gnome.org>2000-08-13 09:45:40 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-13 09:45:40 +0800
commit6db2c0fb510e4a3d4ba22bd9e2051d6380422ff7 (patch)
tree906a8965e892f3a0a6ac0c58ac150365a5cd9745 /calendar
parent85184f711c30f2436a5341b595860fc6d4c74a7d (diff)
downloadgsoc2013-evolution-6db2c0fb510e4a3d4ba22bd9e2051d6380422ff7.tar.gz
gsoc2013-evolution-6db2c0fb510e4a3d4ba22bd9e2051d6380422ff7.tar.zst
gsoc2013-evolution-6db2c0fb510e4a3d4ba22bd9e2051d6380422ff7.zip
Sync - Federico
svn path=/trunk/; revision=4789
Diffstat (limited to 'calendar')
-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);