[evolution-patches] patch for #71679 (calendar)



-- 
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	1 Mar 2005 16:54:04 -0000
@@ -1,3 +1,7 @@
+2005-03-01  Rodrigo Moya <rodrigo novell com>
+
+	* libecal/e-cal.c (add_instance): use full date for recur-id.
+
 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	1 Mar 2005 16:54:05 -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: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2680
diff -u -p -r1.2680 ChangeLog
--- ChangeLog	1 Mar 2005 01:14:56 -0000	1.2680
+++ ChangeLog	1 Mar 2005 16:54:55 -0000
@@ -1,3 +1,11 @@
+2005-03-01  Rodrigo Moya <rodrigo novell com>
+
+	Fixes #71679
+
+	* gui/e-calendar-view.c (on_unrecur_appointment): use e_cal_util_remove_instances
+	for adding exceptions. Don't set a new UID to not lose relation to the
+	master recurring object.
+
 2005-02-28  Harish Krishnaswamy  <kharish novell com>
 
         Fixes #69556
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.76
diff -u -p -r1.76 e-calendar-view.c
--- gui/e-calendar-view.c	4 Feb 2005 12:18:51 -0000	1.76
+++ gui/e-calendar-view.c	1 Mar 2005 16:54:55 -0000
@@ -1273,6 +1273,7 @@ on_unrecur_appointment (EPopup *ep, EPop
 	GList *selected;
 	ECal *client;
 	char *new_uid;
+	icalcomponent *tmp_icalcomp;
 
 	selected = e_calendar_view_get_selected_events (cal_view);
 	if (!selected)
@@ -1287,9 +1288,10 @@ on_unrecur_appointment (EPopup *ep, EPop
 	/* For the recurring object, we add an exception to get rid of the
 	   instance. */
 
+	tmp_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
+	e_cal_util_remove_instances (tmp_icalcomp, icalcomponent_get_recurrenceid (tmp_icalcomp), CALOBJ_MOD_THIS);
 	comp = e_cal_component_new ();
-	e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-	cal_comp_util_add_exdate (comp, event->comp_data->instance_start, e_calendar_view_get_timezone (cal_view));
+	e_cal_component_set_icalcomponent (comp, tmp_icalcomp);
 	e_cal_component_commit_sequence (comp);
 
 	/* For the unrecurred instance we duplicate the original object,
@@ -1297,9 +1299,6 @@ on_unrecur_appointment (EPopup *ep, EPop
 	   the start & end times to the instances times. */
 	new_comp = e_cal_component_new ();
 	e_cal_component_set_icalcomponent (new_comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-	new_uid = e_cal_component_gen_uid ();
-	e_cal_component_set_uid (new_comp, new_uid);
-	g_free (new_uid);
 	e_cal_component_set_rdate_list (new_comp, NULL);
 	e_cal_component_set_rrule_list (new_comp, NULL);
 	e_cal_component_set_exdate_list (new_comp, NULL);


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