[evolution-data-server/pohly-gnome-2-32: 8/10] 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/pohly-gnome-2-32: 8/10] calendar file backend: removal notification for detached recurrence, part 2
- Date: Tue, 17 May 2011 08:49:24 +0000 (UTC)
commit 55d171be74d6d18e566b22bdbf8a585d58fb9bcb
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 30bf3a0..54fff57 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -2679,6 +2679,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]