From 7b4baac1d34ce22a570f080066856e229462f606 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 25 Jul 2013 19:04:47 -0500 Subject: Add support for displaying alarms. EDS treats alarms as attributes of existing calendar events, so the difference in supporting them in the indicator is largely visual -- we use a different x-canonical-type for the menuitem so that clients can render them differently, such as with an alarm icon. --- src/planner-eds.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/planner-eds.c') diff --git a/src/planner-eds.c b/src/planner-eds.c index 8fdc50b..d417d41 100644 --- a/src/planner-eds.c +++ b/src/planner-eds.c @@ -81,6 +81,7 @@ my_get_appointments_foreach (ECalComponent * component, e_cal_component_get_status (component, &status); if ((status != ICAL_STATUS_COMPLETED) && (status != ICAL_STATUS_CANCELLED)) { + GList * alarm_uids; ECalComponentText text; struct IndicatorDatetimeAppt * appt = g_new0 (struct IndicatorDatetimeAppt, 1); @@ -93,6 +94,10 @@ my_get_appointments_foreach (ECalComponent * component, appt->is_event = vtype == E_CAL_COMPONENT_EVENT; appt->summary = g_strdup (text.value); + alarm_uids = e_cal_component_get_alarm_uids (component); + appt->has_alarms = alarm_uids != NULL; + cal_obj_uid_list_free (alarm_uids); + data->appointments = g_slist_prepend (data->appointments, appt); } } -- cgit v1.2.3