[evolution-patches] fix for the bug #73262 [calendar]



Hi,
  Have attached the fix for the bug.

thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.443
diff -u -p -r1.443 ChangeLog
--- ChangeLog	24 Mar 2005 08:40:24 -0000	1.443
+++ ChangeLog	4 Apr 2005 09:42:32 -0000
@@ -1,3 +1,10 @@
+2005-04-04  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #73262
+	* backends/http/e-cal-backend-http.c: (retrieval_done),
+	(e_cal_backend_http_open): Check for the offline_sync key
+	to decide to show the contents of the calendar in offline.
+
 2005-03-24  Chenthill Palanisamy  <pchenthill novell com>
 	
 	Fixes #73336	
Index: backends/http/e-cal-backend-http.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/http/e-cal-backend-http.c,v
retrieving revision 1.34
diff -u -p -r1.34 e-cal-backend-http.c
--- backends/http/e-cal-backend-http.c	6 Mar 2005 02:47:03 -0000	1.34
+++ backends/http/e-cal-backend-http.c	4 Apr 2005 09:42:32 -0000
@@ -488,6 +488,18 @@ e_cal_backend_http_open (ECalBackendSync
 	cbhttp = E_CAL_BACKEND_HTTP (backend);
 	priv = cbhttp->priv;
 
+	if (priv->mode == CAL_MODE_LOCAL) {
+		ESource *source;
+		const char *display_contents = NULL;
+
+		source = e_cal_backend_get_source (E_CAL_BACKEND (cbhttp));
+		display_contents = e_source_get_property (source, "offline_sync");
+
+		if (!display_contents || !g_str_equal (display_contents, "1")) {
+			return GNOME_Evolution_Calendar_RepositoryOffline;
+		}
+	}
+		
 	if (!priv->cache) {
 		priv->cache = e_cal_backend_cache_new (e_cal_backend_get_uri (E_CAL_BACKEND (backend)));
 
@@ -498,8 +510,10 @@ e_cal_backend_http_open (ECalBackendSync
 		if (priv->mode == CAL_MODE_LOCAL)
 			return GNOME_Evolution_Calendar_Success;
 
-		g_idle_add ((GSourceFunc) begin_retrieval_cb, cbhttp);
 	}
+
+	if (priv->mode == CAL_MODE_REMOTE)
+		g_idle_add ((GSourceFunc) begin_retrieval_cb, cbhttp);
 
 	return GNOME_Evolution_Calendar_Success;
 }


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