2006-10-27 [colin] 2.5.6cvs10
authorColin Leroy <colin@colino.net>
Fri, 27 Oct 2006 18:36:58 +0000 (18:36 +0000)
committerColin Leroy <colin@colino.net>
Fri, 27 Oct 2006 18:36:58 +0000 (18:36 +0000)
* src/compose.c
Probably fix bug 1045, 'sylpheed-claws
doesn't remove the mail from the IMAP
Queue folder after sending'. From
2.5.6cvs3-stable

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index dddda336e09f574d5cac7c831e2fd7a5b6cad8f8..4d2dcbf0bdac8e7fc8bce4e8ceab32da02b0d2b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-27 [colin]     2.5.6cvs10
+
+       * src/compose.c
+               Probably fix bug 1045, 'sylpheed-claws 
+               doesn't remove the mail from the IMAP 
+               Queue folder after sending'. From
+               2.5.6cvs3-stable
+
 2006-10-27 [colin]     2.5.6cvs9
 
        * configure.ac
 2006-10-27 [colin]     2.5.6cvs9
 
        * configure.ac
index 1898145ec740374ee69041ba84df264983d599a4..773c5bf1555d549b18acd43e777f32a59560fb9e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.4.2.35 -r 1.4.2.36 src/gtk/about.c;  ) > 2.5.6cvs7.patchset
 ( cvs diff -u -r 1.213.2.122 -r 1.213.2.123 src/folder.c;  cvs diff -u -r 1.179.2.134 -r 1.179.2.135 src/imap.c;  ) > 2.5.6cvs8.patchset
 ( cvs diff -u -r 1.654.2.2065 -r 1.654.2.2066 configure.ac;  ) > 2.5.6cvs9.patchset
 ( cvs diff -u -r 1.4.2.35 -r 1.4.2.36 src/gtk/about.c;  ) > 2.5.6cvs7.patchset
 ( cvs diff -u -r 1.213.2.122 -r 1.213.2.123 src/folder.c;  cvs diff -u -r 1.179.2.134 -r 1.179.2.135 src/imap.c;  ) > 2.5.6cvs8.patchset
 ( cvs diff -u -r 1.654.2.2065 -r 1.654.2.2066 configure.ac;  ) > 2.5.6cvs9.patchset
+( cvs diff -u -r 1.382.2.318 -r 1.382.2.319 src/compose.c;  ) > 2.5.6cvs10.patchset
index 4349dddd3f670b45265593cff0897fb413a5557e..806b9a918d718899d008a46e936214340770ce3a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1673ee0697a941540cd7e589401194c1c2f1f242..671a8b9c7bde4f51d4f817c145f56262ea066c13 100644 (file)
@@ -4135,6 +4135,7 @@ gint compose_send(Compose *compose)
        gchar *msgpath = NULL;
        gboolean discard_window = FALSE;
        gchar *errstr = NULL;
        gchar *msgpath = NULL;
        gboolean discard_window = FALSE;
        gchar *errstr = NULL;
+       gchar *tmsgid = NULL;
        MainWindow *mainwin = mainwindow_get_mainwindow();
 
        if (prefs_common.send_dialog_mode != SEND_DIALOG_ALWAYS
        MainWindow *mainwin = mainwindow_get_mainwindow();
 
        if (prefs_common.send_dialog_mode != SEND_DIALOG_ALWAYS
@@ -4176,6 +4177,7 @@ gint compose_send(Compose *compose)
                goto bail;
        }
 
                goto bail;
        }
 
+       tmsgid = g_strdup(compose->msgid);
        if (discard_window) {
                compose->sending = FALSE;
                compose_close(compose);
        if (discard_window) {
                compose->sending = FALSE;
                compose_close(compose);
@@ -4192,6 +4194,7 @@ gint compose_send(Compose *compose)
                        goto bail;
                }
                inc_unlock();
                        goto bail;
                }
                inc_unlock();
+               g_free(tmsgid);
                return -1;
        }
        if (msgpath == NULL) {
                return -1;
        }
        if (msgpath == NULL) {
@@ -4209,12 +4212,30 @@ gint compose_send(Compose *compose)
                if (val != 0) {
                        folder_item_remove_msg(folder, msgnum);
                        folder_item_scan(folder);
                if (val != 0) {
                        folder_item_remove_msg(folder, msgnum);
                        folder_item_scan(folder);
+                       if (tmsgid) {
+                               /* make sure we delete that */
+                               MsgInfo *tmp = folder_item_get_msginfo_by_msgid(folder, tmsgid);
+                               if (tmp) {
+                                       debug_print("removing %d via %s\n", tmp->msgnum, tmsgid);
+                                       folder_item_remove_msg(folder, tmp->msgnum);
+                                       procmsg_msginfo_free(tmp);
+                               } 
+                       }
                }
        }
 
        if (val == 0) {
                folder_item_remove_msg(folder, msgnum);
                folder_item_scan(folder);
                }
        }
 
        if (val == 0) {
                folder_item_remove_msg(folder, msgnum);
                folder_item_scan(folder);
+               if (tmsgid) {
+                       /* make sure we delete that */
+                       MsgInfo *tmp = folder_item_get_msginfo_by_msgid(folder, tmsgid);
+                       if (tmp) {
+                               debug_print("removing %d via %s\n", tmp->msgnum, tmsgid);
+                               folder_item_remove_msg(folder, tmp->msgnum);
+                               procmsg_msginfo_free(tmp);
+                       }
+               }
                if (!discard_window)
                        compose_close(compose);
        } else {
                if (!discard_window)
                        compose_close(compose);
        } else {
@@ -4233,8 +4254,10 @@ gint compose_send(Compose *compose)
                        goto bail;              
                }
                inc_unlock();
                        goto bail;              
                }
                inc_unlock();
+               g_free(tmsgid);
                return -1;
        }
                return -1;
        }
+       g_free(tmsgid);
        inc_unlock();
        toolbar_main_set_sensitive(mainwin);
        main_window_set_menu_sensitive(mainwin);
        inc_unlock();
        toolbar_main_set_sensitive(mainwin);
        main_window_set_menu_sensitive(mainwin);
@@ -4242,6 +4265,7 @@ gint compose_send(Compose *compose)
 
 bail:
        inc_unlock();
 
 bail:
        inc_unlock();
+       g_free(tmsgid);
        compose_allow_user_actions (compose, TRUE);
        compose->sending = FALSE;
        compose->modified = TRUE; 
        compose_allow_user_actions (compose, TRUE);
        compose->sending = FALSE;
        compose->modified = TRUE;