[evolution-ews/gnome-3-30] I#25 - Canceled meetings remain in the calendar with Canceled: title
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-3-30] I#25 - Canceled meetings remain in the calendar with Canceled: title
- Date: Thu, 10 Jan 2019 14:30:34 +0000 (UTC)
commit 4dee54e013f4535a9d318ec7cd22764af2dda5b7
Author: Milan Crha <mcrha redhat com>
Date: Thu Jan 10 15:27:47 2019 +0100
I#25 - Canceled meetings remain in the calendar with Canceled: title
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/25
src/calendar/e-cal-backend-ews.c | 41 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index a9532c8a..cfd3313a 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -3605,6 +3605,47 @@ ecb_ews_receive_objects_sync (ECalBackendSync *sync_backend,
}
}
break;
+ case ICAL_METHOD_CANCEL: {
+ ECalObjModType mod_type = E_CAL_OBJ_MOD_ALL;
+ GSList *ids = NULL;
+
+ for (subcomp = icalcomponent_get_first_component (icalcomp, kind);
+ subcomp && success;
+ subcomp = icalcomponent_get_next_component (icalcomp, kind)) {
+ const gchar *uid = icalcomponent_get_uid (subcomp);
+ gchar *rid_str = NULL;
+
+ if (icalcomponent_get_first_property (subcomp, ICAL_RECURRENCEID_PROPERTY)) {
+ struct icaltimetype rid = icaltime_null_time ();
+
+ rid = icalcomponent_get_recurrenceid (subcomp);
+
+ rid_str = (icaltime_is_valid_time (rid) && !icaltime_is_null_time (rid)) ?
+ icaltime_as_ical_string_r (rid) : g_strdup ("0");
+
+ mod_type = E_CAL_OBJ_MOD_THIS;
+ }
+
+ ids = g_slist_prepend (ids, e_cal_component_id_new (uid, rid_str));
+
+ g_free (rid_str);
+ }
+
+ if (ids) {
+ GSList *old_comps = NULL, *new_comps = NULL;
+ GError *local_error = NULL;
+
+ e_cal_backend_sync_remove_objects (sync_backend, cal, cancellable, ids, mod_type,
&old_comps, &new_comps, &local_error);
+
+ do_refresh = !local_error;
+
+ e_util_free_nullable_object_slist (old_comps);
+ e_util_free_nullable_object_slist (new_comps);
+ g_clear_error (&local_error);
+ }
+
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ } break;
default:
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]