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 dddda33..4d2dcbf 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
index 1898145..773c5bf 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.382.2.318 -r 1.382.2.319 src/compose.c;  ) > 2.5.6cvs10.patchset
index 4349ddd..806b9a9 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1673ee0..671a8b9 100644 (file)
@@ -4135,6 +4135,7 @@ gint compose_send(Compose *compose)
        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
@@ -4176,6 +4177,7 @@ gint compose_send(Compose *compose)
                goto bail;
        }
 
+       tmsgid = g_strdup(compose->msgid);
        if (discard_window) {
                compose->sending = FALSE;
                compose_close(compose);
@@ -4192,6 +4194,7 @@ gint compose_send(Compose *compose)
                        goto bail;
                }
                inc_unlock();
+               g_free(tmsgid);
                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 (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 (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 {
@@ -4233,8 +4254,10 @@ gint compose_send(Compose *compose)
                        goto bail;              
                }
                inc_unlock();
+               g_free(tmsgid);
                return -1;
        }
+       g_free(tmsgid);
        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();
+       g_free(tmsgid);
        compose_allow_user_actions (compose, TRUE);
        compose->sending = FALSE;
        compose->modified = TRUE;