[evolution-patches] [PATCH #53885]e-d-s backend/contact



hi list,

       Fixes #53885

       * backends/contacts/e-cal-backend-contacts.c:
       intermediate fix for recurring entries starting before 1970
       set the dtend for making valid whole-day entries

	++dent

-- 
this signature is mostly RFC 1855 compliant.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.199
diff -u -b -r1.199 ChangeLog
--- ChangeLog	5 Mar 2004 10:18:46 -0000	1.199
+++ ChangeLog	9 Mar 2004 20:20:42 -0000
@@ -1,3 +1,11 @@
+2004-03-09  Thomas Mirlacher <dent cosy sbg ac at>
+
+	Fixes #53885
+
+	* backends/contacts/e-cal-backend-contacts.c:
+	intermediate fix for recurring entries starting before 1970
+	set the dtend for making valid whole-day entries
+
 2004-03-05  Rodrigo Moya <rodrigo ximian com>
 
 	Fixes #54280
Index: backends/contacts/e-cal-backend-contacts.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/contacts/e-cal-backend-contacts.c,v
retrieving revision 1.5
diff -u -b -r1.5 e-cal-backend-contacts.c
--- backends/contacts/e-cal-backend-contacts.c	1 Mar 2004 15:45:54 -0000	1.5
+++ backends/contacts/e-cal-backend-contacts.c	9 Mar 2004 20:20:44 -0000
@@ -360,7 +360,11 @@
 {
 	struct icaltimetype ret;
 
-	ret.year = cdate->year;
+/*FIXME: this is a really _ugly_ (temporary) hack
+ *	since several functions are still depending on the epoch,
+ *	let entries start (earliest) at 19700101
+ */
+	ret.year = cdate->year >= 1970 ? cdate->year : 1970;
 	ret.month = cdate->month;
 	ret.day = cdate->day;
 	ret.is_date = TRUE;
@@ -373,7 +377,7 @@
 
 /* Contact -> Event creator */
 static ECalComponent *
-create_component (ECalBackendContacts *cbc, EContactDate *cdate, char *summary)
+create_component (ECalBackendContacts *cbc, EContactDate *cdate, const char *summary)
 {
         ECalComponent             *cal_comp;
 	ECalComponentText          comp_summary;
@@ -401,6 +405,13 @@
         dt.tzid = 0;
         e_cal_component_set_dtstart (cal_comp, &dt);
         
+	itt = cdate_to_icaltime (cdate);
+	icaltime_adjust (&itt, 1, 0, 0, 0);
+	dt.value = &itt;
+	dt.tzid = 0;
+	/* We have to add 1 day to DTEND, as it is not inclusive. */
+	e_cal_component_set_dtend (cal_comp, &dt);
+ 
         /* Create yearly recurrence */
         icalrecurrencetype_clear (&r);
         r.freq = ICAL_YEARLY_RECURRENCE;


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