[evolution-data-server/gnome-2-32] libecal: e_cal_remove_object() must remove *all* recurrences



commit 43ec27446830a113cb1821115e02e0f68de0e8f4
Author: Patrick Ohly <patrick ohly intel com>
Date:   Thu Aug 4 21:18:42 2011 +0200

    libecal: e_cal_remove_object() must remove *all* recurrences
    
    Traditionally, e_cal_remove_object() has always removed all
    recurrences, despite the use of MOD_THIS underneath. That was due to
    the uncertain semantic of MOD_THIS without rid.
    
    Since clarifying that semantic and fixing the (file) backend
    accordingly, e_cal_remove_object() started to behave differently: of
    an event series with detached recurrences, only the parent event was
    removed, which then caused the failures fixed by the previous commits.
    
    This commit fixes that by switching to MOD_ALL, which properly
    reflects the semantic of the API call. It was tested successfully with
    the file backend.
    
    (cherry picked from commit 272cb7d5ef42a0c1acb72fd3a0fba2bf53f959c8)

 calendar/libecal/e-cal.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index fcdc9f2..fbbcca5 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -3764,9 +3764,10 @@ e_cal_remove_object_with_mod (ECal *ecal, const gchar *uid,
  * @uid: Unique identifier of the calendar component to remove.
  * @error: Placeholder for error information.
  *
- * Asks a calendar to remove a component.  If the server is able to remove the
- * component, all clients will be notified and they will emit the "obj_removed"
- * signal.
+ * Asks a calendar to remove all components with the given UID.
+ * If more control of the removal is desired, then use e_cal_remove_object_with_mod().
+ * If the server is able to remove the component(s), all clients will
+ * be notified and they will emit the "obj_removed" signal.
  *
  * Returns: %TRUE if successful, %FALSE otherwise.
  **/
@@ -3776,7 +3777,7 @@ e_cal_remove_object (ECal *ecal, const gchar *uid, GError **error)
 	e_return_error_if_fail (ecal && E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
 	e_return_error_if_fail (uid, E_CALENDAR_STATUS_INVALID_ARG);
 
-	return e_cal_remove_object_with_mod (ecal, uid, NULL, CALOBJ_MOD_THIS, error);
+	return e_cal_remove_object_with_mod (ecal, uid, NULL, CALOBJ_MOD_ALL, error);
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]