diff --git a/ChangeLog b/ChangeLog index ca2b3609b..c0a7bee40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-08-27 [colin] 2.4.0cvs98 + + * src/compose.c + * src/messageview.c + * src/procmsg.c + * src/procmsg.h + When possible, copy the queued mail to sent folder + instead of re-adding. Much faster on IMAP. + 2006-08-27 [colin] 2.4.0cvs97 * src/msgcache.c diff --git a/PATCHSETS b/PATCHSETS index c9a3aba77..298ce8e18 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1789,3 +1789,4 @@ ( cvs diff -u -r 1.1.2.10 -r 1.1.2.11 manual/handling.xml; ) > 2.4.0cvs95.patchset ( cvs diff -u -r 1.654.2.1834 -r 1.654.2.1835 configure.ac; cvs diff -u -r 1.8.2.5 -r 1.8.2.6 src/plugins/Makefile.am; diff -u /dev/null src/plugins/bogofilter/.cvsignore; diff -u /dev/null src/plugins/bogofilter/Makefile.am; diff -u /dev/null src/plugins/bogofilter/bogofilter.c; diff -u /dev/null src/plugins/bogofilter/bogofilter.h; diff -u /dev/null src/plugins/bogofilter/bogofilter_gtk.c; ) > 2.4.0cvs96.patchset ( cvs diff -u -r 1.16.2.37 -r 1.16.2.38 src/msgcache.c; cvs diff -u -r 1.395.2.235 -r 1.395.2.236 src/summaryview.c; cvs diff -u -r 1.13.2.19 -r 1.13.2.20 src/common/plugin.c; cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/common/plugin.h; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/common/timing.h; cvs diff -u -r 1.13.2.22 -r 1.13.2.23 src/plugins/clamav/clamav_plugin.c; cvs diff -u -r 1.13.2.7 -r 1.13.2.8 src/plugins/demo/demo.c; cvs diff -u -r 1.12.2.13 -r 1.12.2.14 src/plugins/dillo_viewer/dillo_viewer.c; cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/plugins/pgpcore/plugin.c; cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/plugins/pgpinline/pgpinline.c; cvs diff -u -r 1.1.2.37 -r 1.1.2.38 src/plugins/pgpmime/pgpmime.c; cvs diff -u -r 1.18.2.36 -r 1.18.2.37 src/plugins/spamassassin/spamassassin.c; cvs diff -u -r 1.14.2.36 -r 1.14.2.37 src/plugins/trayicon/trayicon.c; ) > 2.4.0cvs97.patchset +( cvs diff -u -r 1.382.2.304 -r 1.382.2.305 src/compose.c; cvs diff -u -r 1.94.2.99 -r 1.94.2.100 src/messageview.c; cvs diff -u -r 1.150.2.75 -r 1.150.2.76 src/procmsg.c; cvs diff -u -r 1.60.2.33 -r 1.60.2.34 src/procmsg.h; ) > 2.4.0cvs98.patchset diff --git a/configure.ac b/configure.ac index acb860c6e..25fb26f50 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=4 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=97 +EXTRA_VERSION=98 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c index 59d7ce217..a9cb7194b 100644 --- a/src/compose.c +++ b/src/compose.c @@ -4144,13 +4144,12 @@ gint compose_send(Compose *compose) inc_unlock(); return -1; } - if (msgpath == NULL) { msgpath = folder_item_fetch_msg(folder, msgnum); - val = procmsg_send_message_queue(msgpath, &errstr); + val = procmsg_send_message_queue(msgpath, &errstr, folder, msgnum); g_free(msgpath); } else { - val = procmsg_send_message_queue(msgpath, &errstr); + val = procmsg_send_message_queue(msgpath, &errstr, folder, msgnum); g_unlink(msgpath); g_free(msgpath); } diff --git a/src/messageview.c b/src/messageview.c index 80aa8eb46..7ad272064 100644 --- a/src/messageview.c +++ b/src/messageview.c @@ -713,7 +713,7 @@ static gint disposition_notification_send(MsgInfo *msginfo) /* send it */ path = folder_item_fetch_msg(queue, num); - ok = procmsg_send_message_queue(path, &foo); + ok = procmsg_send_message_queue(path, &foo, queue, num); g_free(path); g_free(foo); folder_item_remove_msg(queue, num); diff --git a/src/procmsg.c b/src/procmsg.c index ce066f08e..4879c1b94 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -48,7 +48,8 @@ #include "timing.h" #include "inc.h" -static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_session, gchar **errstr); +static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_session, gchar **errstr, + FolderItem *queue, gint msgnum); enum { @@ -940,7 +941,7 @@ gint procmsg_send_queue(FolderItem *queue, gboolean save_msgs, gchar **errstr) if (file) { if (procmsg_send_message_queue_full(file, !procmsg_is_last_for_account(queue, msginfo, elem), - errstr) < 0) { + errstr, queue, msginfo->msgnum) < 0) { g_warning("Sending queued message %d failed.\n", msginfo->msgnum); err++; @@ -1450,7 +1451,8 @@ gint procmsg_cmp_msgnum_for_sort(gconstpointer a, gconstpointer b) return msginfo1->msgnum - msginfo2->msgnum; } -static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_session, gchar **errstr) +static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_session, gchar **errstr, + FolderItem *queue, gint msgnum) { static HeaderEntry qentry[] = {{"S:", NULL, FALSE}, {"SSV:", NULL, FALSE}, @@ -1730,7 +1732,15 @@ send_mail: outbox = folder_get_default_outbox(); if (save_clear_text || tmp_enc_file == NULL) { - procmsg_save_to_outbox(outbox, file, TRUE); + gboolean saved = FALSE; + if (queue && msgnum > 0) { + MsgInfo *queued_mail = folder_item_get_msginfo(queue, msgnum); + if (folder_item_copy_msg(outbox, queued_mail) >= 0) + saved = TRUE; + procmsg_msginfo_free(queued_mail); + } + if (!saved) + procmsg_save_to_outbox(outbox, file, TRUE); } else { procmsg_save_to_outbox(outbox, tmp_enc_file, FALSE); } @@ -1799,9 +1809,9 @@ send_mail: return (newsval != 0 ? newsval : mailval); } -gint procmsg_send_message_queue(const gchar *file, gchar **errstr) +gint procmsg_send_message_queue(const gchar *file, gchar **errstr, FolderItem *queue, gint msgnum) { - gint result = procmsg_send_message_queue_full(file, FALSE, errstr); + gint result = procmsg_send_message_queue_full(file, FALSE, errstr, queue, msgnum); toolbar_main_set_sensitive(mainwindow_get_mainwindow()); return result; } diff --git a/src/procmsg.h b/src/procmsg.h index f5fcf8e96..ed364125e 100644 --- a/src/procmsg.h +++ b/src/procmsg.h @@ -323,7 +323,9 @@ guint procmsg_msginfo_memusage (MsgInfo *msginfo); gint procmsg_cmp_msgnum_for_sort (gconstpointer a, gconstpointer b); gint procmsg_send_message_queue (const gchar *file, - gchar **errstr); + gchar **errstr, + FolderItem *queue, + gint msgnum); void procmsg_msginfo_set_flags (MsgInfo *msginfo, MsgPermFlags perm_flags,