[evolution-patches] patch for the bug #72894



Hi,
   Have attached the patch to fix 72894.

thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.436
diff -u -p -r1.436 ChangeLog
--- ChangeLog	8 Mar 2005 07:59:47 -0000	1.436
+++ ChangeLog	9 Mar 2005 09:35:11 -0000
@@ -1,3 +1,10 @@
+2005-03-09  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #72894
+	* backends/groupwise/e-cal-backend-groupwise.c:
+	(e_cal_backend_groupwise_open): Get the source from
+	gconf and check the offline_sync key.
+
 2005-03-08  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #73141
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.136
diff -u -p -r1.136 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	28 Feb 2005 18:23:14 -0000	1.136
+++ backends/groupwise/e-cal-backend-groupwise.c	9 Mar 2005 09:35:12 -0000
@@ -39,10 +39,10 @@
 #include <libedata-cal/e-cal-backend-util.h>
 #include <libecal/e-cal-component.h>
 #include <libecal/e-cal-time-util.h>
+#include <libedataserver/e-source-list.h>
 #include "e-cal-backend-groupwise.h"
 #include "e-cal-backend-groupwise-utils.h"
 #include "e-gw-connection.h"
-
 /* Private part of the CalBackendGroupwise structure */
 struct _ECalBackendGroupwisePrivate {
 	/* A mutex to control access to the private structure */
@@ -799,7 +799,8 @@ e_cal_backend_groupwise_open (ECalBacken
 	ECalBackendSyncStatus status;
 	char *mangled_uri;
 	int i;
-	
+	GConfClient *gconf = gconf_client_get_default ();
+
 	cbgw = E_CAL_BACKEND_GROUPWISE (backend);
 	priv = cbgw->priv;
 
@@ -810,15 +811,30 @@ e_cal_backend_groupwise_open (ECalBacken
 	if (priv->mode == CAL_MODE_LOCAL) {
 		ESource *source;
 		const char *display_contents = NULL;
-			
+		const char *uid;
+		icalcomponent_kind kind;
+		ESourceList *source_list;
+
 		cbgw->priv->read_only = TRUE;				
 		source = e_cal_backend_get_source (E_CAL_BACKEND (cbgw));
-		display_contents = e_source_get_property (source, "offline_sync");
+		kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw));
+		
+		if (kind == ICAL_VEVENT_COMPONENT) 
+			source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
+		 else 
+			source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources");
 		
+		uid = e_source_peek_uid (source);
+		source = e_source_list_peek_source_by_uid (source_list, uid);
+		display_contents = e_source_get_property (source, "offline_sync");
+
+		g_object_unref (gconf);
+		g_object_unref (source_list);
 		if (!display_contents || !g_str_equal (display_contents, "1")) {
 			g_mutex_unlock (priv->mutex);	
 			return GNOME_Evolution_Calendar_RepositoryOffline;
 		}
+
 
 		if (!priv->cache) {
 			priv->cache = e_cal_backend_cache_new (e_cal_backend_get_uri (E_CAL_BACKEND (cbgw)));


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