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:43:18 +0800
commitf81c52332e44e2b1ae1d7ef2e91c719fb207ed5c (patch)
treee07ad39cc50a245d593697a6d3bae86aeba5383b
parentfea1a50cfa009838b03dece1081c1a7c936340d6 (diff)
downloadgsoc2013-evolution-f81c52332e44e2b1ae1d7ef2e91c719fb207ed5c.tar
gsoc2013-evolution-f81c52332e44e2b1ae1d7ef2e91c719fb207ed5c.tar.gz
gsoc2013-evolution-f81c52332e44e2b1ae1d7ef2e91c719fb207ed5c.tar.bz2
gsoc2013-evolution-f81c52332e44e2b1ae1d7ef2e91c719fb207ed5c.tar.lz
gsoc2013-evolution-f81c52332e44e2b1ae1d7ef2e91c719fb207ed5c.tar.xz
gsoc2013-evolution-f81c52332e44e2b1ae1d7ef2e91c719fb207ed5c.tar.zst
gsoc2013-evolution-f81c52332e44e2b1ae1d7ef2e91c719fb207ed5c.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..20bf1fd55c 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), "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)