[evolution-patches] patch to fix the appearance of events in task view [calendar]



Hi,
   Have attached the patch.

thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.431
diff -u -p -r1.431 ChangeLog
--- ChangeLog	28 Feb 2005 15:10:22 -0000	1.431
+++ ChangeLog	28 Feb 2005 18:00:07 -0000
@@ -1,5 +1,12 @@
 2005-02-28  Chenthill Palanisamy  <pchenthill novell com>
 
+	* backends/groupwise/e-cal-backend-groupwise.c: 
+ 	(get_deltas): Check if the component type is the same
+	as the backend kind before sending notification to the 
+	view.	
+
+2005-02-28  Chenthill Palanisamy  <pchenthill novell com>
+
 	Fixes #72958
 	* backends/groupwise/e-cal-backend-groupwise.c:
 	(e_cal_backend_groupwise_create_object): If the server
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.135
diff -u -p -r1.135 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	28 Feb 2005 15:10:22 -0000	1.135
+++ backends/groupwise/e-cal-backend-groupwise.c	28 Feb 2005 18:00:08 -0000
@@ -191,6 +191,7 @@ get_deltas (gpointer handle)
 	EGwConnection *cnc; 
  	ECalBackendCache *cache; 
         EGwConnectionStatus status; 
+	icalcomponent_kind kind;
 	GSList *item_list, *cache_keys, *l;
 	char *comp_str;
 	char *time_string = NULL;
@@ -201,6 +202,7 @@ get_deltas (gpointer handle)
 		return FALSE;
 	cbgw = (ECalBackendGroupwise *) handle;
 	priv= cbgw->priv;
+	kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw));
  	cnc = priv->cnc; 
  	cache = priv->cache; 
 	item_list = NULL;
@@ -253,9 +255,11 @@ get_deltas (gpointer handle)
 			if (!e_cal_backend_cache_put_component (cache, comp)) 
 				g_message ("Could not add the component");
 			else  {
-				comp_str = e_cal_component_get_as_string (comp);	
-				e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), comp_str);
-				g_free (comp_str);
+				if (kind == icalcomponent_isa (e_cal_component_get_icalcomponent (comp))) {
+					comp_str = e_cal_component_get_as_string (comp);	
+					e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), comp_str);
+					g_free (comp_str);
+				}
 			}
 		}
 		else 
@@ -305,10 +309,12 @@ get_deltas (gpointer handle)
 		e_cal_component_commit_sequence (modified_comp);
 		e_cal_component_commit_sequence (cache_comp);
 
-		cache_comp_str = e_cal_component_get_as_string (cache_comp);
-		e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), cache_comp_str, e_cal_component_get_as_string (modified_comp));
+		if (kind == icalcomponent_isa (e_cal_component_get_icalcomponent (modified_comp))) {
+			cache_comp_str = e_cal_component_get_as_string (cache_comp);
+			e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), cache_comp_str, e_cal_component_get_as_string (modified_comp));
+			g_free (cache_comp_str);
+		}
 		e_cal_backend_cache_put_component (cache, modified_comp);
-		g_free (cache_comp_str);
 		g_object_unref (item);
 		g_object_unref (modified_comp);
 	}



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