[evolution-patches] Fix for bug 72145 (groupwise provider)



attached patch fixes bug 72145
-partha
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.33
diff -u -p -r1.33 ChangeLog
--- ChangeLog	3 Mar 2005 10:21:58 -0000	1.33
+++ ChangeLog	3 Mar 2005 11:34:41 -0000
@@ -1,3 +1,16 @@
+2005-03-03  Parthasarathi Susarla <sparthasarathi novell com>
+	
+	* camel-groupwise-store.c:
+	  (groupwise_get_folder): added recipient view
+	  for get quick messages
+	* camel-groupwise-folder.c:
+	  (groupwise_refresh_info): added recipient view
+	  for get quick messages
+	  (gw_update_summary): parse the recipient list
+	  for mail ids to be set in the "To" field of the 
+	  summary.
+	  ** Fixes # 72145
+
 2005-03-03  Vivek Jain <jvivek novell com>
 
 	***Fixes # 72455
Index: camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.39
diff -u -p -r1.39 camel-groupwise-store.c
--- camel-groupwise-store.c	2 Mar 2005 06:48:48 -0000	1.39
+++ camel-groupwise-store.c	3 Mar 2005 11:34:43 -0000
@@ -551,7 +551,7 @@ groupwise_get_folder (CamelStore *store,
 		t_str = g_strdup (time_string);
 		/* FIXME send the time stamp which the server sends */
 		status = e_gw_connection_get_quick_messages (priv->cnc, container_id,
-				"distribution attachments subject created",
+				"recipient distribution attachments subject created",
 				&t_str, "New", NULL, NULL, -1, &slist) ;
 		if (status != E_GW_CONNECTION_STATUS_OK) {
 			//camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
@@ -579,7 +579,7 @@ groupwise_get_folder (CamelStore *store,
 		t_str = g_strdup (time_string);
 		/* FIXME send the time stamp which the server sends */
 		status = e_gw_connection_get_quick_messages (priv->cnc, container_id,
-					"distribution attachments subject created",
+					"recipient distribution attachments subject created",
 					&t_str, "Modified", NULL, NULL, -1, &slist) ; 
 		g_free (t_str), t_str = NULL;
 		if (status != E_GW_CONNECTION_STATUS_OK) {
@@ -879,7 +879,7 @@ groupwise_get_folder_info (CamelStore *s
 		     (type == E_GW_CONTAINER_TYPE_CHECKLIST) ||
 		     (type == E_GW_CONTAINER_TYPE_DRAFT) ||
 		     (type == E_GW_CONTAINER_TYPE_CABINET) ||
-		     (type == E_GW_CONTAINER_TYPE_TRASH) )
+		     (type == E_GW_CONTAINER_TYPE_TRASH) ) 
 			fi->flags |= CAMEL_FOLDER_SYSTEM ;
 		/*
 		  parent_hash contains the "parent id <-> container id" combination. So we form
Index: camel-groupwise-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v
retrieving revision 1.34
diff -u -p -r1.34 camel-groupwise-folder.c
--- camel-groupwise-folder.c	3 Mar 2005 10:21:58 -0000	1.34
+++ camel-groupwise-folder.c	3 Mar 2005 11:34:43 -0000
@@ -654,7 +654,7 @@ groupwise_refresh_info(CamelFolder *fold
 	CAMEL_SERVICE_LOCK (gw_store, connect_lock);
 	/* FIXME send the time stamp which the server sends */
 	status = e_gw_connection_get_quick_messages (cnc, container_id,
-					"distribution created attachments subject",
+					"recipient distribution created attachments subject",
 					&t_str, "New", NULL, NULL, -1, &slist) ;
 	
 	g_free (t_str), t_str = NULL;
@@ -673,7 +673,7 @@ groupwise_refresh_info(CamelFolder *fold
 	t_str = g_strdup (time_string);
 	/* FIXME send the time stamp which the server sends */
 	status = e_gw_connection_get_quick_messages (cnc, container_id,
-				"distribution created attachments subject",
+				"recipient distribution created attachments subject",
 				&t_str, "Modified", NULL, NULL, -1, &slist) ;
 	g_free (t_str), t_str = NULL;
 	if (status != E_GW_CONNECTION_STATUS_OK) {
@@ -727,6 +727,7 @@ gw_update_summary ( CamelFolder *folder,
 		EGwItemOrganizer *org ;
 		char *date = NULL, *temp_date = NULL ;
 		const char *id ;
+		GSList *recp_list = NULL ;
 
 		id = e_gw_item_get_id (item) ;
 		mi = (CamelGroupwiseMessageInfo *)camel_folder_summary_uid (folder->summary, id) ;
@@ -772,11 +773,27 @@ gw_update_summary ( CamelFolder *folder,
 				mi->info.flags |= CAMEL_MESSAGE_ATTACHMENTS;
 
 			org = e_gw_item_get_organizer (item) ; 
-			if (org) {
+			if (org) 
 				mi->info.from = g_strconcat(org->display_name,"<",org->email,">",NULL) ;
-				mi->info.to = g_strdup(e_gw_item_get_to (item)) ;
+			recp_list = e_gw_item_get_recipient_list (item);
+			if (recp_list) {
+				GSList *rl;
+				char *str = "";
+				int i = 0;
+				for (rl = recp_list; rl != NULL; rl = rl->next) {
+					EGwItemRecipient *recp = (EGwItemRecipient *) rl->data;
+					if (recp->type == E_GW_ITEM_RECIPIENT_TO) {
+						if (i)
+							str = g_strconcat (str, ", ", NULL);
+						str = g_strconcat (str, recp->display_name,"<",
+								   recp->email,">", NULL);
+					}
+					i++;
+				}
+				mi->info.to = g_strdup(str);
+				g_free (str);
 			}
-
+			
 			temp_date = e_gw_item_get_creation_date(item) ;
 			if (temp_date) {
 				time_t time = e_gw_connection_get_date_from_string (temp_date) ;


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