aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2013-07-24 17:46:42 +0800
committerFabiano FidĂȘncio <fidencio@redhat.com>2013-07-24 21:39:25 +0800
commita7eea3e491338a74484a46d27f16f12639e45378 (patch)
treea52f6ba3b6b95289751cd19b9142a906a0ec5898
parent0ee86ee261ed7ed813695f1f162de27d00eb532f (diff)
downloadgsoc2013-evolution-a7eea3e491338a74484a46d27f16f12639e45378.tar.gz
gsoc2013-evolution-a7eea3e491338a74484a46d27f16f12639e45378.tar.zst
gsoc2013-evolution-a7eea3e491338a74484a46d27f16f12639e45378.zip
Only use the alarm description if the client supports it
https://bugzilla.gnome.org/show_bug.cgi?id=386113
-rw-r--r--calendar/alarm-notify/alarm-queue.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/calendar/alarm-notify/alarm-queue.c b/calendar/alarm-notify/alarm-queue.c
index 87b6e92e19..3b2b1e489a 100644
--- a/calendar/alarm-notify/alarm-queue.c
+++ b/calendar/alarm-notify/alarm-queue.c
@@ -1594,7 +1594,8 @@ tray_list_add_new (TrayIconData *data)
}
static void
-alarm_queue_get_alarm_summary (ECalComponent *comp,
+alarm_queue_get_alarm_summary (ECalClient *cal_client,
+ ECalComponent *comp,
const ECalComponentAlarmInstance *instance,
ECalComponentText *text,
ECalComponentAlarm **palarm)
@@ -1607,12 +1608,16 @@ alarm_queue_get_alarm_summary (ECalComponent *comp,
text->value = NULL;
- *palarm = e_cal_component_get_alarm (comp, instance->auid);
- if (*palarm) {
- e_cal_component_alarm_get_description (*palarm, text);
- if (!text->value || !*text->value) {
- text->value = NULL;
- e_cal_component_alarm_free (*palarm);
+ if (e_client_check_capability (E_CLIENT (cal_client), CAL_STATIC_CAPABILITY_ALARM_DESCRIPTION)) {
+ *palarm = e_cal_component_get_alarm (comp, instance->auid);
+ if (*palarm) {
+ e_cal_component_alarm_get_description (*palarm, text);
+ if (!text->value || !*text->value) {
+ text->value = NULL;
+ e_cal_component_alarm_free (*palarm);
+ *palarm = NULL;
+ }
+ } else {
*palarm = NULL;
}
}
@@ -1647,7 +1652,7 @@ display_notification (time_t trigger,
return;
/* get a sensible description for the event */
- alarm_queue_get_alarm_summary (comp, qa->instance, &text, &comp_alarm);
+ alarm_queue_get_alarm_summary (cqa->parent_client->cal_client, comp, qa->instance, &text, &comp_alarm);
e_cal_component_get_organizer (comp, &organiser);
if (text.value)
@@ -1785,7 +1790,7 @@ popup_notification (time_t trigger,
notify_init (_("Evolution Reminders"));
/* get a sensible description for the event */
- alarm_queue_get_alarm_summary (comp, qa->instance, &text, &comp_alarm);
+ alarm_queue_get_alarm_summary (cqa->parent_client->cal_client, comp, qa->instance, &text, &comp_alarm);
e_cal_component_get_organizer (comp, &organiser);
if (text.value)