[evolution-patches] small fix for broken recurrences



Recurrences work got broken in the last few weeks, so instead of sending
a huge patch, I'm going to send small patches that fix small issues, so
that they can get into 2.2.0 or 2.2.1

Here's the first one, that disables THISANDPRIOR/THISANDFUTURE in the
file backend because that is completely broken on the GUI :( It also
removes the code to add exceptions to the master object when detaching
instances
-- 
Rodrigo Moya <rodrigo novell com>
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.432
diff -u -p -r1.432 ChangeLog
--- ChangeLog	28 Feb 2005 18:23:13 -0000	1.432
+++ ChangeLog	4 Mar 2005 15:18:55 -0000
@@ -1,3 +1,13 @@
+2005-xx-xx  Rodrigo Moya <rodrigo novell com>
+
+	* libecal/e-cal.c (add_instance): set RECURRENCE-ID correctly.
+
+	* backends/file/e-cal-backend-file.c
+	(e_cal_backend_file_modify_object): no need to add exceptions for
+	detached recurrences.
+	(e_cal_backend_file_get_static_capabilities): disable THISAND*, so that
+	the broken GUI does not try to use them.
+
 2005-02-28  Chenthill Palanisamy  <pchenthill novell com>
 
 	* backends/groupwise/e-cal-backend-groupwise.c: 
Index: libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.94
diff -u -p -r1.94 e-cal.c
--- libecal/e-cal.c	9 Feb 2005 00:29:26 -0000	1.94
+++ libecal/e-cal.c	4 Mar 2005 15:18:55 -0000
@@ -2953,8 +2953,7 @@ add_instance (ECalComponent *comp, time_
 	/* set the RECUR-ID for the instance */
 	if (e_cal_util_component_has_recurrences (icalcomp)) {
 		if (!(icalcomponent_get_first_property (icalcomp, ICAL_RECURRENCEID_PROPERTY))) {
-			itt = icaltime_from_timet (start, TRUE);
-			itt.hour = itt.minute = itt.second = 0;
+			itt = icaltime_from_timet (start, itt_start.is_date);
 			icalcomponent_set_recurrenceid (icalcomp, itt);
 		}
 	}
Index: backends/file/e-cal-backend-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file.c,v
retrieving revision 1.53
diff -u -p -r1.53 e-cal-backend-file.c
--- backends/file/e-cal-backend-file.c	24 Feb 2005 10:58:57 -0000	1.53
+++ backends/file/e-cal-backend-file.c	4 Mar 2005 15:18:56 -0000
@@ -361,7 +361,9 @@ e_cal_backend_file_get_alarm_email_addre
 static ECalBackendSyncStatus
 e_cal_backend_file_get_static_capabilities (ECalBackendSync *backend, EDataCal *cal, char **capabilities)
 {
-	*capabilities = g_strdup (CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS);
+	*capabilities = g_strdup (CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS ","
+				  CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
+				  CAL_STATIC_CAPABILITY_NO_THISANDPRIOR);
 	
 	return GNOME_Evolution_Calendar_Success;
 }
@@ -1861,9 +1863,6 @@ e_cal_backend_file_modify_object (ECalBa
 
 			old = e_cal_component_get_as_string (obj_data->full_object);
 
-			e_cal_util_remove_instances (e_cal_component_get_icalcomponent (obj_data->full_object),
-						     get_rid_icaltime (comp),
-						     mod);
 			new = e_cal_component_get_as_string (comp);
 			e_cal_backend_notify_object_modified (E_CAL_BACKEND (backend), old, new);
 
@@ -1920,10 +1919,6 @@ e_cal_backend_file_modify_object (ECalBa
 			if (old_object)
 				*old_object = e_cal_component_get_as_string (obj_data->full_object);
 		}
-
-		/* remove all affected recurrences */
-		e_cal_util_remove_instances (e_cal_component_get_icalcomponent (obj_data->full_object),
-					     icaltime_from_string (rid), mod);
 
 		rrdata.cbfile = cbfile;
 		rrdata.obj_data = obj_data;


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