2009-04-05 [colin] 3.7.1cvs40
authorColin Leroy <colin@colino.net>
Sun, 5 Apr 2009 17:40:38 +0000 (17:40 +0000)
committerColin Leroy <colin@colino.net>
Sun, 5 Apr 2009 17:40:38 +0000 (17:40 +0000)
* src/procmsg.c
Don't ask whether we want to send deleted mails in queue
folders; also, don't send deleted mails when flushing
queues

ChangeLog
PATCHSETS
configure.ac
src/procmsg.c

index c5e0063..365a6aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-05 [colin]     3.7.1cvs40
+
+       * src/procmsg.c
+               Don't ask whether we want to send deleted mails in queue
+               folders; also, don't send deleted mails when flushing
+               queues
+
 2009-04-04 [paul]      3.7.1cvs39
 
        * AUTHORS
index 67870fa..cf95c81 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.505 -r 1.382.2.506 src/compose.c;  cvs diff -u -r 1.96.2.218 -r 1.96.2.219 src/textview.c;  ) > 3.7.1cvs37.patchset
 ( cvs diff -u -r 1.100.2.66 -r 1.100.2.67 AUTHORS;  cvs diff -u -r 1.1.2.54 -r 1.1.2.55 src/gtk/authors.h;  ) > 3.7.1cvs38.patchset
 ( cvs diff -u -r 1.100.2.67 -r 1.100.2.68 AUTHORS;  cvs diff -u -r 1.654.2.3846 -r 1.654.2.3847 configure.ac;  diff -u /dev/null po/id.po;  cvs diff -u -r 1.1.2.55 -r 1.1.2.56 src/gtk/authors.h;  cvs diff -u -r 1.1.2.19 -r 1.1.2.20 tools/claws.i18n.status.pl;  ) > 3.7.1cvs39.patchset
+( cvs diff -u -r 1.150.2.114 -r 1.150.2.115 src/procmsg.c;  ) > 3.7.1cvs40.patchset
index c1fc03c..04bef64 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=39
+EXTRA_VERSION=40
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 395879b..1daa89a 100644 (file)
@@ -890,7 +890,7 @@ gint procmsg_send_queue(FolderItem *queue, gboolean save_msgs, gchar **errstr)
                MsgInfo *msginfo;
                        
                msginfo = (MsgInfo *)(elem->data);
-               if (!MSG_IS_LOCKED(msginfo->flags)) {
+               if (!MSG_IS_LOCKED(msginfo->flags) && !MSG_IS_DELETED(msginfo->flags)) {
                        file = folder_item_fetch_msg(queue, msginfo->msgnum);
                        if (file) {
                                gboolean queued_removed = FALSE;
@@ -2397,8 +2397,23 @@ static void item_has_queued_mails(FolderItem *item, gpointer data)
        gboolean *result = (gboolean *)data;
        if (*result == TRUE)
                return;
-       if (folder_has_parent_of_type(item, F_QUEUE) && item->total_msgs > 0)
-               *result = TRUE;
+       if (folder_has_parent_of_type(item, F_QUEUE)) {
+               if (item->total_msgs == 0)
+                       return;
+               else {
+                       GSList *msglist = folder_item_get_msg_list(item);
+                       GSList *cur;
+                       for (cur = msglist; cur; cur = cur->next) {
+                               MsgInfo *msginfo = (MsgInfo *)cur->data;
+                               if (!MSG_IS_DELETED(msginfo->flags) &&
+                                   !MSG_IS_LOCKED(msginfo->flags)) {
+                                       *result = TRUE;
+                                       break;
+                               }
+                       }
+                       procmsg_msg_list_free(msglist);
+               }
+       }
 }
 
 gboolean procmsg_have_queued_mails_fast (void)