[evolution-data-server] Bug 794417 - Let expand recurring tasks when generating reminders
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 794417 - Let expand recurring tasks when generating reminders
- Date: Wed, 21 Mar 2018 16:19:20 +0000 (UTC)
commit c1e53ad2f6d1e922a6fbeaa8c108649608284ca4
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 21 17:10:08 2018 +0100
Bug 794417 - Let expand recurring tasks when generating reminders
src/calendar/libecal/e-cal-util.c | 34 +++++-----------------------------
1 files changed, 5 insertions(+), 29 deletions(-)
---
diff --git a/src/calendar/libecal/e-cal-util.c b/src/calendar/libecal/e-cal-util.c
index c3fc3a8..8c45dab 100644
--- a/src/calendar/libecal/e-cal-util.c
+++ b/src/calendar/libecal/e-cal-util.c
@@ -594,7 +594,6 @@ e_cal_util_generate_alarms_for_comp (ECalComponent *comp,
GList *alarm_uids;
time_t alarm_start, alarm_end;
struct alarm_occurrence_data aod;
- icalcomponent *icalcomp;
ECalComponentAlarms *alarms;
if (!e_cal_component_has_alarms (comp))
@@ -611,34 +610,11 @@ e_cal_util_generate_alarms_for_comp (ECalComponent *comp,
aod.triggers = NULL;
aod.n_triggers = 0;
- icalcomp = e_cal_component_get_icalcomponent (comp);
-
- if (icalcomponent_isa (icalcomp) == ICAL_VEVENT_COMPONENT ||
- !e_cal_util_component_has_recurrences (icalcomp) ||
- !icaltime_is_null_time (icalcomponent_get_recurrenceid (icalcomp))) {
- e_cal_recur_generate_instances (
- comp, alarm_start, alarm_end,
- add_alarm_occurrences_cb, &aod,
- resolve_tzid, user_data,
- default_timezone);
- } else {
- /* Workaround to not expand recurrences for non-VEVENT components.
- The component here has recurrences, but not RECURRENCE-ID.
- The function doesn't expand recurrences, when there exists
- RECURRENCE-ID, thus use this. */
- struct icaltimetype itt;
-
- itt = icalcomponent_get_dtstart (icalcomp);
- icalcomponent_set_recurrenceid (icalcomp, itt);
-
- e_cal_recur_generate_instances (
- comp, alarm_start, alarm_end,
- add_alarm_occurrences_cb, &aod,
- resolve_tzid, user_data,
- default_timezone);
-
- e_cal_util_remove_property_by_kind (icalcomp, ICAL_RECURRENCEID_PROPERTY, FALSE);
- }
+ e_cal_recur_generate_instances (
+ comp, alarm_start, alarm_end,
+ add_alarm_occurrences_cb, &aod,
+ resolve_tzid, user_data,
+ default_timezone);
/* We add the ABSOLUTE triggers separately */
generate_absolute_triggers (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]