[evolution-data-server] calendar file backend: removal notification for detached recurrence, part 2
- From: Patrick Ohly <pohly src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] calendar file backend: removal notification for detached recurrence, part 2
- Date: Tue, 7 Jun 2011 09:36:22 +0000 (UTC)
commit 571b77cdfad1788a9320ec29449c1e6a26f0c70b
Author: Patrick Ohly <patrick ohly intel com>
Date: Thu May 12 13:30:06 2011 +0200
calendar file backend: removal notification for detached recurrence, part 2
e_cal_remove_object_with_mod() can only return one pair of old/new
object pointers to the caller. When the function modifies the parent
and removes a detached recurrence, the removal of the detached
recurrence had to be deduced by clients from the modification of the
parent.
Now clients are explicitly informed about removal of the detached
recurrence in addition to the modification of the parent.
calendar/backends/file/e-cal-backend-file.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 0caf5a0..0d85bf7 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -2455,6 +2455,17 @@ remove_instance (ECalBackendFile *cbfile, ECalBackendFileObject *obj_data,
if (old_object && !obj_data->full_object)
*old_object = e_cal_component_get_as_string (comp);
+ /* Removing with parent? Report directly instead of going via caller. */
+ if (obj_data->full_object) {
+ /* old object string not provided,
+ instead rely on the view detecting
+ whether it contains the id */
+ ECalComponentId id;
+ id.uid = (gchar *)uid;
+ id.rid = (gchar *)rid;
+ e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbfile), &id, NULL, NULL);
+ }
+
/* remove the component from our data */
icalcomponent_remove_component (cbfile->priv->icalcomp,
e_cal_component_get_icalcomponent (comp));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]