evolution-data-server r8609 - trunk/camel
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8609 - trunk/camel
- Date: Wed, 2 Apr 2008 14:32:09 +0100 (BST)
Author: mcrha
Date: Wed Apr 2 14:32:08 2008
New Revision: 8609
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8609&view=rev
Log:
2008-04-02 Milan Crha <mcrha redhat com>
** Part of fix for bug #271863
* camel-folder.h: New CAMEL_FOLDER_JUNKED_NOT_DELETED property.
* camel-folder.c: (folder_getv):
Count junk messages which are not marked as deleted separately.
Modified:
trunk/camel/ChangeLog
trunk/camel/camel-folder.c
trunk/camel/camel-folder.h
Modified: trunk/camel/camel-folder.c
==============================================================================
--- trunk/camel/camel-folder.c (original)
+++ trunk/camel/camel-folder.c Wed Apr 2 14:32:08 2008
@@ -307,7 +307,7 @@
CamelFolder *folder = (CamelFolder *)object;
int i;
guint32 tag;
- int unread = -1, deleted = 0, junked = 0, visible = 0, count = -1;
+ int unread = -1, deleted = 0, junked = 0, junked_not_deleted = 0, visible = 0, count = -1;
for (i = 0; i < args->argc; i++) {
CamelArgGet *arg = &args->argv[i];
@@ -341,6 +341,7 @@
case CAMEL_FOLDER_ARG_UNREAD:
case CAMEL_FOLDER_ARG_DELETED:
case CAMEL_FOLDER_ARG_JUNKED:
+ case CAMEL_FOLDER_ARG_JUNKED_NOT_DELETED:
case CAMEL_FOLDER_ARG_VISIBLE:
/* This is so we can get the values atomically, and also so we can calculate them only once */
if (unread == -1) {
@@ -358,8 +359,11 @@
unread++;
if (flags & CAMEL_MESSAGE_DELETED)
deleted++;
- if (flags & CAMEL_MESSAGE_JUNK)
+ if (flags & CAMEL_MESSAGE_JUNK) {
junked++;
+ if (! (flags & CAMEL_MESSAGE_DELETED))
+ junked_not_deleted++;
+ }
if ((flags & (CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK)) == 0)
visible++;
camel_message_info_free(info);
@@ -377,6 +381,9 @@
case CAMEL_FOLDER_ARG_JUNKED:
count = junked;
break;
+ case CAMEL_FOLDER_ARG_JUNKED_NOT_DELETED:
+ count = junked_not_deleted;
+ break;
case CAMEL_FOLDER_ARG_VISIBLE:
count = visible;
break;
Modified: trunk/camel/camel-folder.h
==============================================================================
--- trunk/camel/camel-folder.h (original)
+++ trunk/camel/camel-folder.h Wed Apr 2 14:32:08 2008
@@ -52,6 +52,7 @@
CAMEL_FOLDER_ARG_UID_ARRAY,
CAMEL_FOLDER_ARG_INFO_ARRAY,
CAMEL_FOLDER_ARG_PROPERTIES,
+ CAMEL_FOLDER_ARG_JUNKED_NOT_DELETED, /* junked, but not deleted messages */
CAMEL_FOLDER_ARG_LAST = CAMEL_ARG_FIRST + 0x2000
};
@@ -64,6 +65,7 @@
CAMEL_FOLDER_UNREAD = CAMEL_FOLDER_ARG_UNREAD | CAMEL_ARG_INT,
CAMEL_FOLDER_DELETED = CAMEL_FOLDER_ARG_DELETED | CAMEL_ARG_INT,
CAMEL_FOLDER_JUNKED = CAMEL_FOLDER_ARG_JUNKED | CAMEL_ARG_INT,
+ CAMEL_FOLDER_JUNKED_NOT_DELETED = CAMEL_FOLDER_ARG_JUNKED_NOT_DELETED | CAMEL_ARG_INT,
CAMEL_FOLDER_VISIBLE = CAMEL_FOLDER_ARG_VISIBLE | CAMEL_ARG_INT,
CAMEL_FOLDER_UID_ARRAY = CAMEL_FOLDER_ARG_UID_ARRAY | CAMEL_ARG_PTR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]