[evolution-patches] [calendar-groupwise] revised patch for 309499



sorry, attachment missing in previous mail.

hi

 Revised patch for bug # 309499
 is attached based on the suggestions received.

 This solves the issue that delegation of a meeting
 to B after delegation to A results in mail being sent 
 to A again. 

 please review.

regards.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.489
diff -u -p -w -r1.489 ChangeLog
--- ChangeLog	3 Aug 2005 08:34:18 -0000	1.489
+++ ChangeLog	8 Aug 2005 08:16:00 -0000
@@ -1,3 +1,11 @@
+2005-08-06  P. S. Chakravarthi	<pchakravarthi novell com>
+
+	Fixes #309499
+	* backends/groupwise/e-cal-backend-groupwise-utils.c:
+	(set_attendees_to_item): Reset the 'delfrom' parameter to 
+	empty string and set the attendee_list back to the ECalComponent 
+	so that recipient list is build, containing current invitees only.  
+
 2005-08-02  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #310328
Index: backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v
retrieving revision 1.60
diff -u -p -w -r1.60 e-cal-backend-groupwise-utils.c
--- backends/groupwise/e-cal-backend-groupwise-utils.c	3 Aug 2005 08:34:18 -0000	1.60
+++ backends/groupwise/e-cal-backend-groupwise-utils.c	8 Aug 2005 08:16:05 -0000
@@ -343,6 +343,7 @@ static void
 set_attendees_to_item (EGwItem *item, ECalComponent *comp, icaltimezone *default_zone, gboolean delegate, const char *user_email)
 {
 	if (e_cal_component_has_attendees (comp)) {
+		gboolean att_changed = FALSE;
 		GSList *attendee_list, *recipient_list = NULL, *al;
 
 		e_cal_component_get_attendee_list (comp, &attendee_list);	
@@ -353,6 +354,11 @@ set_attendees_to_item (EGwItem *item, EC
 			if (delegate && (g_str_equal (attendee->value + 7, user_email) || !(attendee->delfrom && *attendee->delfrom)))
 				continue;		
 			
+			if (delegate) {
+				attendee->delfrom = "";
+				att_changed = TRUE;
+			}
+	
 			recipient = g_new0 (EGwItemRecipient, 1);
 
 			/* len (MAILTO:) + 1 = 7 */
@@ -375,6 +381,13 @@ set_attendees_to_item (EGwItem *item, EC
 			recipient_list = g_slist_append (recipient_list, recipient);
 		}
 
+		/* Reset the ECalComponent with changes if necessary*/
+		if(att_changed)
+			e_cal_component_set_attendee_list (comp, attendee_list);	
+
+		e_cal_component_free_attendee_list(attendee_list);
+	
+		/* recipient_list shouldn't be freed. Look into the function below. */
 		e_gw_item_set_recipient_list (item, recipient_list);
 
 		/* Send Options */


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