[evolution-data-server/pohly-gnome-2-32: 9/10] calendar file backend: explicitly send removal notifications for detached recurrences



commit 4c6096b77885ca363b9128249b540e7d7058ea48
Author: Patrick Ohly <patrick ohly intel com>
Date:   Thu May 12 13:30:06 2011 +0200

    calendar file backend: explicitly send removal notifications for detached recurrences
    
    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]