From 6d70e07d0842496327e1ca74f93047693ddc545c Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Fri, 22 May 2009 17:30:14 +0530 Subject: Mail changes required for Anjal. --- mail/mail-ops.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mail/mail-ops.c') diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 6feadd5b9c..24628a5f91 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -72,6 +72,8 @@ #define w(x) #define d(x) +extern const char *x_mailer; + /* used for both just filtering a folder + uid's, and for filtering a whole folder */ /* used both for fetching mail, and for filtering mail */ struct _filter_mail_msg { @@ -461,7 +463,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, if (!message) return; - camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT); + camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", x_mailer); err = g_string_new(""); xev = mail_tool_remove_xevolution_headers (message); @@ -918,8 +920,7 @@ mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageIn g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message)); if (!camel_medium_get_header (CAMEL_MEDIUM (message), "X-Mailer")) - camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", - "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT); + camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", x_mailer); m = mail_msg_new (&append_mail_info); m->folder = folder; @@ -1878,7 +1879,7 @@ typedef void (*get_done)(CamelFolder *folder, const char *uid, CamelMimeMessage static void get_messagex_done (struct _get_message_msg *m) { - if (m->done) { + if (m->done && !camel_operation_cancel_check (m->cancel)) { get_done done = (get_done)m->done; done(m->folder, m->uid, m->message, m->data, &m->base.ex); } @@ -1894,7 +1895,7 @@ static MailMsgInfo get_messagex_info = { /* This is temporary, to avoid having to rewrite everything that uses mail_get_message; it adds an exception argument to the callback */ -void +CamelOperation * mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *), void *data, MailMsgDispatchFunc dispatch) { @@ -1909,6 +1910,8 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde m->cancel = camel_operation_new(NULL, NULL); dispatch (m); + + return m->cancel; } /* ********************************************************************** */ -- cgit v1.2.3 From 0cf607076dfc2c481ca1164a04cecdb0661e6bd0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 10:58:25 -0400 Subject: Fix compiler warnings in mail. --- mail/mail-ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mail/mail-ops.c') diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 24628a5f91..d2183dd7e3 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -97,7 +97,7 @@ struct _fetch_mail_msg { char *source_uri; - void (*done)(char *source, void *data); + void (*done)(const char *source, void *data); void *data; }; @@ -400,7 +400,7 @@ void mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation *cancel, CamelFilterGetFolderFunc get_folder, void *get_data, CamelFilterStatusFunc *status, void *status_data, - void (*done)(char *source, void *data), void *data) + void (*done)(const char *source, void *data), void *data) { struct _fetch_mail_msg *m; struct _filter_mail_msg *fm; @@ -429,13 +429,13 @@ mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation /* sending stuff */ /* ** SEND MAIL *********************************************************** */ -static char *normal_recipients[] = { +static const gchar *normal_recipients[] = { CAMEL_RECIPIENT_TYPE_TO, CAMEL_RECIPIENT_TYPE_CC, CAMEL_RECIPIENT_TYPE_BCC }; -static char *resent_recipients[] = { +static const gchar *resent_recipients[] = { CAMEL_RECIPIENT_TYPE_RESENT_TO, CAMEL_RECIPIENT_TYPE_RESENT_CC, CAMEL_RECIPIENT_TYPE_RESENT_BCC @@ -665,7 +665,7 @@ struct _send_queue_msg { CamelFilterStatusFunc *status; void *status_data; - void (*done)(char *destination, void *data); + void (*done)(const char *destination, void *data); void *data; }; @@ -832,7 +832,7 @@ mail_send_queue(CamelFolder *queue, const char *destination, const char *type, CamelOperation *cancel, CamelFilterGetFolderFunc get_folder, void *get_data, CamelFilterStatusFunc *status, void *status_data, - void (*done)(char *destination, void *data), void *data) + void (*done)(const char *destination, void *data), void *data) { struct _send_queue_msg *m; -- cgit v1.2.3 From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- mail/mail-ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mail/mail-ops.c') diff --git a/mail/mail-ops.c b/mail/mail-ops.c index d2183dd7e3..4f310db812 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1,5 +1,5 @@ /* - * mail-ops.c: callbacks for the mail toolbar/menus + * mail-ops.c: callbacks for the mail toolbar/menus * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: @@ -721,7 +721,7 @@ send_queue_exec (struct _send_queue_msg *m) camel_operation_register (m->cancel); else camel_operation_register (m->base.cancel); - + if (!m->cancel) camel_operation_start (NULL, _("Sending message")); @@ -783,7 +783,7 @@ send_queue_exec (struct _send_queue_msg *m) camel_folder_sync (sent_folder, FALSE, &ex); camel_exception_clear (&ex); } - + if (!m->cancel) camel_operation_end (NULL); @@ -791,7 +791,7 @@ send_queue_exec (struct _send_queue_msg *m) camel_operation_unregister (m->cancel); else camel_operation_unregister (m->base.cancel); - + } static void @@ -2463,7 +2463,7 @@ prepare_offline_exec (struct _set_offline_msg *m) } else if (CAMEL_IS_OFFLINE_STORE (m->store)) { camel_offline_store_prepare_for_offline (CAMEL_OFFLINE_STORE (m->store), &m->base.ex); - } + } } static void -- cgit v1.2.3