aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-ops.c35
-rw-r--r--mail/message-list.c4
3 files changed, 35 insertions, 10 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 56a1c7f226..d8b8730ba4 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
2000-05-26 Dan Winship <danw@helixcode.com>
+ * mail-ops.c (composer_send_cb, reply): set CAMEL_MESSAGE_ANSWERED
+ on a message after a successful reply.
+
+ * message-list.c (folder_changed): free the summary with
+ camel_folder_free_summary rather than g_ptr_array_free.
+
* mail-format.c (handle_via_bonobo): Update for PersistStream
changes
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 16d045f1b0..606532a5ef 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -262,10 +262,16 @@ fetch_mail (GtkWidget *button, gpointer user_data)
}
+struct post_send_data {
+ CamelMimeMessage *message;
+ guint32 flags;
+};
+
static void
composer_send_cb (EMsgComposer *composer, gpointer data)
{
static CamelTransport *transport = NULL;
+ struct post_send_data *psd = data;
static char *from = NULL;
CamelException *ex;
CamelMimeMessage *message;
@@ -307,7 +313,7 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
mail_exception_dialog ("Could not load mail transport",
ex, composer);
camel_exception_free (ex);
- return;
+ goto free_psd;
}
}
@@ -324,15 +330,23 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
camel_transport_send (transport, CAMEL_MEDIUM (message), ex);
if (!camel_exception_is_set (ex))
camel_service_disconnect (CAMEL_SERVICE (transport), ex);
- if (camel_exception_is_set (ex)) {
+ if (camel_exception_is_set (ex))
mail_exception_dialog ("Could not send message", ex, composer);
- camel_exception_free (ex);
- gtk_object_unref (GTK_OBJECT (message));
- return;
+ else if (psd) {
+ guint32 set;
+
+ set = camel_mime_message_get_flags (psd->message);
+ camel_mime_message_set_flags (psd->message, psd->flags, ~set);
}
camel_exception_free (ex);
gtk_object_unref (GTK_OBJECT (message));
+
+ free_psd:
+ if (psd) {
+ gtk_object_unref (GTK_OBJECT (psd->message));
+ g_free (psd);
+ }
}
@@ -371,15 +385,20 @@ static void
reply (FolderBrowser *fb, gboolean to_all)
{
EMsgComposer *composer;
+ struct post_send_data *psd;
if (!check_configured ())
return;
- composer = mail_generate_reply (fb->mail_display->current_message,
- to_all);
+ psd = g_new (struct post_send_data, 1);
+ psd->message = fb->mail_display->current_message;
+ gtk_object_ref (GTK_OBJECT (psd->message));
+ psd->flags = CAMEL_MESSAGE_ANSWERED;
+
+ composer = mail_generate_reply (psd->message, to_all);
gtk_signal_connect (GTK_OBJECT (composer), "send",
- GTK_SIGNAL_FUNC (composer_send_cb), NULL);
+ GTK_SIGNAL_FUNC (composer_send_cb), psd);
gtk_widget_show (GTK_WIDGET (composer));
}
diff --git a/mail/message-list.c b/mail/message-list.c
index d556fc1514..a18ec3b42b 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -757,8 +757,8 @@ static void
folder_changed(CamelFolder *f, int type, MessageList *message_list)
{
if (message_list->summary_table)
- g_ptr_array_free(message_list->summary_table, TRUE);
- message_list->summary_table = camel_folder_get_summary (message_list->folder, NULL);
+ camel_folder_free_summary(f, message_list->summary_table);
+ message_list->summary_table = camel_folder_get_summary (f, NULL);
message_list_set_search(message_list, message_list->search);
}