[evolution-patches] patch for #61782 (calendar)
- From: Rodrigo Moya <rodrigo novell com>
- To: Evolution Patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] patch for #61782 (calendar)
- Date: Mon, 16 Aug 2004 13:49:04 +0200
This is based on Zucchi's patch, which seems was not committed.
--
Rodrigo Moya <rodrigo novell com>
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.312
diff -u -p -r1.312 ChangeLog
--- ChangeLog 16 Aug 2004 10:31:53 -0000 1.312
+++ ChangeLog 16 Aug 2004 11:47:58 -0000
@@ -1,3 +1,10 @@
+2004-08-16 Rodrigo Moya <rodrigo novell com>
+
+ Fixes #61782
+
+ * backends/file/e-cal-backend-file.c (e_cal_backend_file_create_object):
+ allow iCalendar objects with no UID.
+
2004-08-13 Hans Petter Jansson <hpj ximian com>
Fixes bug #62655.
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.34
diff -u -p -r1.34 e-cal-backend-file.c
--- backends/file/e-cal-backend-file.c 11 Jun 2004 15:54:15 -0000 1.34
+++ backends/file/e-cal-backend-file.c 16 Aug 2004 11:48:00 -0000
@@ -1652,6 +1652,20 @@ e_cal_backend_file_create_object (ECalBa
/* Get the UID */
comp_uid = icalcomponent_get_uid (icalcomp);
+ if (!comp_uid) {
+ char *new_uid;
+
+ new_uid = e_cal_component_gen_uid ();
+ if (!new_uid) {
+ icalcomponent_free (icalcomp);
+ return GNOME_Evolution_Calendar_InvalidObject;
+ }
+
+ icalcomponent_set_uid (icalcomp, new_uid);
+ comp_uid = icalcomponent_get_uid (icalcomp);
+
+ g_free (new_uid);
+ }
/* check the object is not in our cache */
if (lookup_component (cbfile, comp_uid)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]