aboutsummaryrefslogtreecommitdiff
path: root/src/planner-eds.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-25 19:04:47 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-25 19:04:47 -0500
commit7b4baac1d34ce22a570f080066856e229462f606 (patch)
tree1fe434370027aaeddbd6a69ff8d427c06128f913 /src/planner-eds.c
parent7364cf8dcb250e69748cdf077556778dd60a5f1d (diff)
downloadayatana-indicator-datetime-7b4baac1d34ce22a570f080066856e229462f606.tar.gz
ayatana-indicator-datetime-7b4baac1d34ce22a570f080066856e229462f606.tar.bz2
ayatana-indicator-datetime-7b4baac1d34ce22a570f080066856e229462f606.zip
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.
Diffstat (limited to 'src/planner-eds.c')
-rw-r--r--src/planner-eds.c5
1 files changed, 5 insertions, 0 deletions
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);
}
}