evolution-data-server r9350 - in trunk/calendar: . libecal



Author: mcrha
Date: Thu Aug 14 14:30:51 2008
New Revision: 9350
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9350&view=rev

Log:
2008-08-14  Milan Crha  <mcrha redhat com>

	** Fix for bug #327851

	* libecal/e-cal.c: (generate_instances):
	Skip detached instances which doesn't belong to requested time range.



Modified:
   trunk/calendar/ChangeLog
   trunk/calendar/libecal/e-cal.c

Modified: trunk/calendar/libecal/e-cal.c
==============================================================================
--- trunk/calendar/libecal/e-cal.c	(original)
+++ trunk/calendar/libecal/e-cal.c	Thu Aug 14 14:30:51 2008
@@ -3597,7 +3597,13 @@
 			e_cal_component_free_datetime (&dtstart);
 			e_cal_component_free_datetime (&dtend);
 
-			detached_instances = g_list_prepend (detached_instances, ci);
+			if (ci->start <= end && ci->end >= start) {
+				detached_instances = g_list_prepend (detached_instances, ci);
+			} else {
+				/* it doesn't fit to our time range, thus skip it */
+				g_object_unref (G_OBJECT (ci->comp));
+				g_free (ci);
+			}
 		} else {
 			ECalComponentDateTime datetime;
 			icaltimezone *start_zone;



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