From 24c212a1e2f400804387484b7515823dde4fce4b Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Mon, 11 Jul 2005 02:35:49 +0000 Subject: Use e_cal_remove_object for non-recurring appointments. Fixed some memory leaks. svn path=/trunk/; revision=29703 --- calendar/gui/gnome-cal.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 0a42ce13ee..a672b534ff 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -3326,8 +3326,14 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) &remove); /* FIXME Better error handling */ - if (remove) - e_cal_remove_object (client, icalcomponent_get_uid (m->data), NULL); + if (remove) { + const char *uid = icalcomponent_get_uid (m->data); + + if (e_cal_util_component_is_instance (m->data) || e_cal_util_component_has_recurrences (m->data)) + e_cal_remove_object_with_mod (client, uid, NULL, CALOBJ_MOD_ALL, NULL); + else + e_cal_remove_object (client, uid, NULL); + } } g_list_foreach (objects, (GFunc) icalcomponent_free, NULL); -- cgit