aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-11 01:28:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-07-11 01:34:21 +0800
commitae834b3a2ff4101b657a2dccae0d6c20a35eac28 (patch)
tree5618f14e5ec20eb9d2c9d7bf804c8e772b71d581 /composer/e-msg-composer.c
parent830102ae9fef49bf5f97bae503b069d7731be712 (diff)
downloadgsoc2013-evolution-ae834b3a2ff4101b657a2dccae0d6c20a35eac28.tar.gz
gsoc2013-evolution-ae834b3a2ff4101b657a2dccae0d6c20a35eac28.tar.zst
gsoc2013-evolution-ae834b3a2ff4101b657a2dccae0d6c20a35eac28.zip
EMsgComposer: Minor cleanups.
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 5ff7427108..27f454c08f 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -496,7 +496,7 @@ set_recipients_from_destv (CamelMimeMessage *msg,
static void
build_message_headers (EMsgComposer *composer,
- CamelMimeMessage *msg,
+ CamelMimeMessage *message,
gboolean redirect)
{
EComposerHeaderTable *table;
@@ -506,34 +506,34 @@ build_message_headers (EMsgComposer *composer,
const gchar *reply_to;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (msg));
+ g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
table = e_msg_composer_get_header_table (composer);
/* Subject: */
subject = e_composer_header_table_get_subject (table);
- camel_mime_message_set_subject (msg, subject);
+ camel_mime_message_set_subject (message, subject);
- /* From: / Resent-From: */
account = e_composer_header_table_get_account (table);
if (account != NULL) {
+ CamelMedium *medium;
CamelInternetAddress *addr;
const gchar *name = account->id->name;
const gchar *address = account->id->address;
+ medium = CAMEL_MEDIUM (message);
+
+ /* From: / Resent-From: */
addr = camel_internet_address_new ();
camel_internet_address_add (addr, name, address);
-
if (redirect) {
gchar *value;
value = camel_address_encode (CAMEL_ADDRESS (addr));
- camel_medium_set_header (
- CAMEL_MEDIUM (msg), "Resent-From", value);
+ camel_medium_set_header (medium, "Resent-From", value);
g_free (value);
} else
- camel_mime_message_set_from (msg, addr);
-
+ camel_mime_message_set_from (message, addr);
g_object_unref (addr);
}
@@ -545,7 +545,7 @@ build_message_headers (EMsgComposer *composer,
addr = camel_internet_address_new ();
if (camel_address_unformat (CAMEL_ADDRESS (addr), reply_to) > 0)
- camel_mime_message_set_reply_to (msg, addr);
+ camel_mime_message_set_reply_to (message, addr);
g_object_unref (addr);
}
@@ -560,7 +560,7 @@ build_message_headers (EMsgComposer *composer,
cc = e_composer_header_table_get_destinations_cc (table);
bcc = e_composer_header_table_get_destinations_bcc (table);
- set_recipients_from_destv (msg, to, cc, bcc, redirect);
+ set_recipients_from_destv (message, to, cc, bcc, redirect);
e_destination_freev (to);
e_destination_freev (cc);
@@ -568,16 +568,17 @@ build_message_headers (EMsgComposer *composer,
}
/* Date: */
- camel_mime_message_set_date (msg, CAMEL_MESSAGE_DATE_CURRENT, 0);
+ camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
/* X-Evolution-PostTo: */
header = e_composer_header_table_get_header (
table, E_COMPOSER_HEADER_POST_TO);
if (e_composer_header_get_visible (header)) {
- CamelMedium *medium = CAMEL_MEDIUM (msg);
+ CamelMedium *medium;
const gchar *name = "X-Evolution-PostTo";
GList *list, *iter;
+ medium = CAMEL_MEDIUM (message);
camel_medium_remove_header (medium, name);
list = e_composer_header_table_get_post_to (table);