diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2011-08-04 21:18:42 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2011-08-10 18:12:03 +0200 |
commit | c58cf949c8fdcf56630d8db1ed24d1305548d89c (patch) | |
tree | e90d222358108a20bb06f8231b958fa7c6f0bc21 | |
parent | ddc2261568c4a4a6d5a39adabaa3bc190b380991 (diff) | |
download | evolution-data-server-c58cf949c8fdcf56630d8db1ed24d1305548d89c.tar.gz |
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)
-rw-r--r-- | 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 c82845319..8b8ba8838 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -3827,9 +3827,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. **/ @@ -3839,7 +3840,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); } /** |