[evolution-patches] patch for updating the view [calendar]



Hi,
   Have attached a patch which would update the view of the client when
a meeting request is accepted or declined.

thanks, chenthill.
? clear_cache.diff
? patch
? patch_60265.diff
? patch_62866.diff
? populate_cac.diff
? recurrence.diff
? update_requests.diff
? ~?
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.317
diff -u -r1.317 ChangeLog
--- ChangeLog	23 Aug 2004 04:37:07 -0000	1.317
+++ ChangeLog	23 Aug 2004 12:19:14 -0000
@@ -1,3 +1,9 @@
+2004-08-23  Chenthill Palanisamy <pchenthill novell com>
+         
+	* backends/groupwise/e-cal-backend-groupwise.c
+	(receive_object): update the client view when a meeting
+	is accepted or declined.
+
 2004-08-16  Chenthill Palanisamy <pchenthill novell com>
 	
 	Fixes bug #62857
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.85
diff -u -r1.85 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	23 Aug 2004 04:37:07 -0000	1.85
+++ backends/groupwise/e-cal-backend-groupwise.c	23 Aug 2004 12:19:14 -0000
@@ -1056,7 +1056,7 @@
 			g_object_unref (comp);
 			return GNOME_Evolution_Calendar_OtherError;
 		}
-
+	
 		if (uid_list && (g_slist_length (uid_list) == 1)) {
 			server_uid = (char *) uid_list->data;
 			sanitize_component (backend, comp, server_uid);	
@@ -1295,9 +1295,32 @@
 			
 			e_cal_component_get_uid (comp, (const char **) &uid);
 			e_cal_backend_cache_remove_component (priv->cache, uid, NULL);
+			e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), uid, e_cal_component_get_as_string (comp));
 		}
-		else
+		else {
+			char *cache_comp = NULL, *modif_comp, *temp;
+			ECalComponent *cache_component;
+			
+			e_cal_component_get_uid (comp, &temp);	
+			cache_component = e_cal_backend_cache_get_component (priv->cache, temp, NULL);
+			
+			if (cache_component)
+				cache_comp = e_cal_component_get_as_string (cache_component);
+
 			e_cal_backend_cache_put_component (priv->cache, comp);	
+			modif_comp = e_cal_component_get_as_string (comp);
+			
+			if (cache_comp)
+				e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), cache_comp, modif_comp);
+			else
+				e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), e_cal_component_get_as_string (comp));
+				
+		g_free (cache_comp);
+		g_free (modif_comp);
+		g_free (temp);
+		g_free (cache_component);
+		}
+		
 		return GNOME_Evolution_Calendar_Success;
 	}
 


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