[evolution-patches] Fix for bug #329733 [Mail]



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
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  <sranjan novell com>
+     
+	** 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 <a9016009 gmx de>
 	* 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")


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