[evolution-patches] (groupwise) patch for bug 274194 - fix for filtering messages



Hi,
the attached patch fixes the filtering of messages issue with the
groupwise provider.

Thanks and Cheers,
partha
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.50
diff -u -p -r1.50 ChangeLog
--- ChangeLog	27 Apr 2005 10:04:29 -0000	1.50
+++ ChangeLog	27 Apr 2005 10:20:06 -0000
@@ -1,5 +1,20 @@
 2005-04-27  Parthasarathi Susarla <sparthasarathi novell com>
 	
+	* camel-groupwise-folder.c: 
+	  (camel_gw_folder_new): set the 'CAMEL_FOLDER_FILTER_RECENT' 
+	  folder flag for the Mailbox folder
+	  (gw_update_summary): add the new messages in the ChangeInfo
+	  structure under 'recent' type. Only those uids which fall
+	  under recent are filtered.
+	
+	* camel-groupwise-store.c:
+	  (groupwise_store_construct): set 'CAMEL_STORE_FILTER_INBOX' 
+	  to store flags, to enable filtering
+
+	  ** Fixes bug #274194
+	  
+2005-04-27  Parthasarathi Susarla <sparthasarathi novell com>
+	
 	* camel-groupwise-folder.c: code formatting done.
 	  removed space between the statement and ';' as per
 	  the coding style
Index: camel-groupwise-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v
retrieving revision 1.50
diff -u -p -r1.50 camel-groupwise-folder.c
--- camel-groupwise-folder.c	27 Apr 2005 10:04:29 -0000	1.50
+++ camel-groupwise-folder.c	27 Apr 2005 10:20:06 -0000
@@ -691,6 +691,11 @@ camel_gw_folder_new(CamelStore *store, c
 		return NULL;
 	}
 
+	if (!g_ascii_strncasecmp (folder_name, "Mailbox", 7)) {
+		if (camel_url_get_param (((CamelService *) store)->url, "filter"))
+			folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT;
+	}
+	
 	gw_folder->search = camel_folder_search_new ();
 	if (!gw_folder->search) {
 		camel_object_unref (folder);
@@ -948,6 +953,7 @@ gw_update_summary ( CamelFolder *folder,
 		else {
 			camel_folder_summary_add (folder->summary,(CamelMessageInfo *)mi);
 			camel_folder_change_info_add_uid (changes, mi->info.uid);
+			camel_folder_change_info_recent_uid (changes, mi->info.uid);
 		}
 
 		g_ptr_array_add (msg, mi);
Index: camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.42
diff -u -p -r1.42 camel-groupwise-store.c
--- camel-groupwise-store.c	18 Apr 2005 13:28:18 -0000	1.42
+++ camel-groupwise-store.c	27 Apr 2005 10:20:07 -0000
@@ -302,6 +302,10 @@ groupwise_store_construct (CamelService 
 		priv->port = g_strdup ("7191");
 	else
 		priv->port = g_strdup (property_value);
+
+	/*filter*/
+	if (camel_url_get_param (url, "filter")) 
+		store->flags |= CAMEL_STORE_FILTER_INBOX;
 	
 	/*Hash Table*/	
 	priv->id_hash = g_hash_table_new (g_str_hash, g_str_equal) ;


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