Fix for bug #329733 [Mail]

Ranjan Somani <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <[email protected]>
Hi

Attached fix for Bug# 329733 – right-click->properties and label below
send/receive shows different no. of total messages
http://bugzilla.gnome.org/show_bug.cgi?id=329733

Please Review

Thanks,
Ranjan

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
bug329733.patch (text/x-patch, 2.4 KB)
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3789
diff -u -p -r1.3789 ChangeLog
--- mail/ChangeLog	7 Feb 2006 12:26:51 -0000	1.3789
+++ mail/ChangeLog	10 Feb 2006 09:46:44 -0000
@@ -1,3 +1,9 @@
+2006-02-10  Ranjan Somani  <[email protected]>
+     
+	** Fixes part of Bug #329733
+ 
+	* mail/em-folder-properties.c: right-click->properties and label below send/receive shows different no. of messages
+
 2006-02-07  Andre Klapper <[email protected]>
 	* mail.error.xml: fixing one typo.
 
Index: mail/em-folder-properties.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-properties.c,v
retrieving revision 1.11
diff -u -p -r1.11 em-folder-properties.c
--- mail/em-folder-properties.c	2 Jan 2006 11:16:00 -0000	1.11
+++ mail/em-folder-properties.c	10 Feb 2006 09:46:50 -0000
@@ -38,6 +38,8 @@
 #include <gtk/gtktogglebutton.h>
 #include <gtk/gtkvbox.h>
 
+#include <gconf/gconf-client.h>
+
 #include <camel/camel-folder.h>
 #include <camel/camel-vee-folder.h>
 #include <libgnome/gnome-i18n.h>
@@ -226,11 +228,14 @@ emfp_dialog_got_folder (char *uri, Camel
 	GtkWidget *dialog, *w;
 	struct _prop_data *prop_data;
 	GSList *l;
-	gint32 count, i;
+	gint32 count, i,deleted;
 	EMConfig *ec;
 	EMConfigTargetFolder *target;
 	CamelArgGetV *arggetv;
 	CamelArgV *argv;
+	gboolean hide_deleted;
+	GConfClient *gconf;
+
 
 	if (folder == NULL)
 		return;
@@ -240,8 +245,13 @@ emfp_dialog_got_folder (char *uri, Camel
 	camel_object_ref (folder);
 
 	camel_object_get (folder, NULL, CAMEL_FOLDER_PROPERTIES, &prop_data->properties, CAMEL_FOLDER_NAME, &prop_data->name,
-			  CAMEL_FOLDER_TOTAL, &prop_data->total, CAMEL_FOLDER_UNREAD, &prop_data->unread, NULL);
-
+			  CAMEL_FOLDER_TOTAL, &prop_data->total, CAMEL_FOLDER_UNREAD, &prop_data->unread, CAMEL_FOLDER_DELETED, &deleted, NULL);
+	
+	gconf = mail_config_get_gconf_client ();
+	hide_deleted = !gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_deleted", NULL);
+	if(hide_deleted && deleted > 0 && strcmp(prop_data->name, "Trash" ))
+		prop_data->total-=deleted;		
+	
 	if (folder->parent_store == mail_component_peek_local_store(NULL)
 	    && (!strcmp(prop_data->name, "Drafts")
 		|| !strcmp(prop_data->name, "Inbox")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.