[evolution-patches] patch for the bug 72958 [calendar]



Hi,
   If the delay delivery is set, the server does not create the item,
and we need not put them  in the cache and also not show them in the
view.

thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.429
diff -u -p -r1.429 ChangeLog
--- ChangeLog	25 Feb 2005 09:59:47 -0000	1.429
+++ ChangeLog	25 Feb 2005 12:05:08 -0000
@@ -1,8 +1,18 @@
+2005-02-25  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #72958
+	* backends/groupwise/e-cal-backend-groupwise.c:
+	(e_cal_backend_groupwise_create_object): If the server
+	sends the status succes without uid present, then it
+	must be due to delay delivery set, so do not put the component
+	in the cache since it might not be created in the server.
+
 2005-02-25  Rodrigo Moya <rodrigo novell com>
 
 	* backends/weather/e-cal-backend-weather.c
 	(e_cal_backend_weather_get_static_capabilities): 'capabilities' is not
 	an array, but an out char * argument.
+
 
 2005-02-25  Chenthill Palanisamy  <pchenthill novell com>
 
Index: backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.133
diff -u -p -r1.133 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	25 Feb 2005 09:12:44 -0000	1.133
+++ backends/groupwise/e-cal-backend-groupwise.c	25 Feb 2005 12:05:09 -0000
@@ -1417,8 +1417,9 @@ e_cal_backend_groupwise_create_object (E
 				return GNOME_Evolution_Calendar_OtherError;
 		}
 	
+		/* If delay deliver has been set, server will not send the uid */
 		if (!uid_list)
-			return GNOME_Evolution_Calendar_OtherError;
+			return GNOME_Evolution_Calendar_Success;
 		
 		if (g_slist_length (uid_list) == 1) {
 			server_uid = (char *) uid_list->data;
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2674
diff -u -p -r1.2674 ChangeLog
--- ChangeLog	23 Feb 2005 18:56:55 -0000	1.2674
+++ ChangeLog	25 Feb 2005 12:04:47 -0000
@@ -1,3 +1,11 @@
+2005-02-25  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #72958
+	* gui/dialogs/comp-editor.c: (save_comp): If the backend
+	returns success, if the delay delivery is set, do not
+	show them in the view, since it will not be created in the 
+	server.
+	
 2005-02-23  Hans Petter Jansson  <hpj novell com>
 
 	* common/authentication.c:
Index: gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.122
diff -u -p -r1.122 comp-editor.c
--- gui/dialogs/comp-editor.c	23 Feb 2005 12:42:43 -0000	1.122
+++ gui/dialogs/comp-editor.c	25 Feb 2005 12:04:47 -0000
@@ -592,6 +592,7 @@ save_comp (CompEditor *editor)
 	GError *error = NULL;
 	GHashTable *timezones;
 	const char *orig_uid;
+	icalcomponent *icalcomp;
 
 	priv = editor->priv;
 
@@ -644,14 +645,36 @@ save_comp (CompEditor *editor)
 	
 	e_cal_component_set_attachment_list (priv->comp,
 			cal_attachment_bar_get_attachment_list ((CalAttachmentBar *) priv->attachment_bar)); 
-
+	icalcomp = e_cal_component_get_icalcomponent (priv->comp);
 	/* send the component to the server */
 	if (!cal_comp_is_on_server (priv->comp, priv->client)) {
-		result = e_cal_create_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), NULL, &error);
+		result = e_cal_create_object (priv->client, icalcomp, NULL, &error);
 	} else {
-		result = e_cal_modify_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), priv->mod, &error);
+		result = e_cal_modify_object (priv->client, icalcomp, priv->mod, &error);
 	}
 
+	/* If the delay delivery is set, the items will not be created in the server immediately,
+	   so we need not show them in the view. They will appear as soon as the server creates
+	   it after the delay period */
+	if (result && e_cal_component_has_attendees (priv->comp)) {
+		gboolean delay_set = FALSE;
+		icalproperty *icalprop;
+		icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
+		while (icalprop) {
+			const char *x_name;
+
+			x_name = icalproperty_get_x_name (icalprop);
+			if (!strcmp (x_name, "X-EVOLUTION-OPTIONS-DELAY")) {
+				delay_set = TRUE;
+				break;
+			}
+
+			icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
+		}
+		if (delay_set)
+			return TRUE;
+	}
+	
 	if (!result) {
 		GtkWidget *dlg;
 		char *msg;


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