[evolution-patches] fix for the bug #323700 [calendar]



Hi,
  Have attached the fix for the bug. For clients which have no master
object for recurrences need not call generate instances. Pass the
recurrence id to remove the detached instances.

thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2940
diff -u -p -u -p -r1.2940 ChangeLog
--- ChangeLog	16 Jan 2006 05:47:06 -0000	1.2940
+++ ChangeLog	16 Jan 2006 10:14:25 -0000
@@ -1,3 +1,12 @@
+2006-01-16  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #323700
+	* gui/gnome-cal.c:
+	(gnome_calendar_on_date_navigator_selection_changed),
+	(gnome_calendar_purge): For clients which have no master object
+	for recurrences need not call generate instances. Pass the 
+	recurrence id to remove the detached instances.
+
 2006-01-16 P S Chakravarthi <pchakravarthi novell com>
 
 	Minor Feature: Reply and Reply all for calendar items of clients
Index: gui/gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.395
diff -u -p -u -p -r1.395 gnome-cal.c
--- gui/gnome-cal.c	13 Jan 2006 09:12:59 -0000	1.395
+++ gui/gnome-cal.c	16 Jan 2006 10:14:26 -0000
@@ -3478,7 +3478,8 @@ gnome_calendar_purge (GnomeCalendar *gca
 			/* FIXME write occur-before and occur-after
 			 * sexp funcs so we don't have to use the max
 			 * int */
-			e_cal_generate_instances_for_object (client, m->data,
+			if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER))
+				e_cal_generate_instances_for_object (client, m->data,
 							     older_than, G_MAXINT32,
 							     (ECalRecurInstanceFn) check_instance_cb,
 							     &remove);
@@ -3487,9 +3488,15 @@ gnome_calendar_purge (GnomeCalendar *gca
 			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
+				if (e_cal_util_component_is_instance (m->data) || e_cal_util_component_has_recurrences (m->data)) {
+					const char *rid = NULL;
+					struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data);
+
+					if (!icaltime_is_null_time (recur_id) )
+						rid = icaltime_as_ical_string (recur_id);
+					
+					e_cal_remove_object_with_mod (client, uid, rid, CALOBJ_MOD_ALL, NULL);
+				} else
 					e_cal_remove_object (client, uid, NULL);
 			}
 		}


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