aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-02-15 05:38:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-02-15 05:38:40 +0800
commite2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019 (patch)
treea2b385f11a3e8dbdb3fb539dea9496cb2f11cc52 /mail
parent24b63477d15ebd6bdc2cd47d3f63fb58c50b07cf (diff)
downloadgsoc2013-evolution-e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019.tar
gsoc2013-evolution-e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019.tar.gz
gsoc2013-evolution-e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019.tar.bz2
gsoc2013-evolution-e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019.tar.lz
gsoc2013-evolution-e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019.tar.xz
gsoc2013-evolution-e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019.tar.zst
gsoc2013-evolution-e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019.zip
Default the from-account to the source account. If that fails, then guess
2002-02-14 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (mail_generate_reply): Default the from-account to the source account. If that fails, then guess the from-account based on the recipients. Fixes bug #20479. svn path=/trunk/; revision=15728
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c26
-rw-r--r--mail/mail-display.c2
3 files changed, 20 insertions, 14 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c0ed52c3c8..ef5bfc6a37 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-callbacks.c (mail_generate_reply): Default the from-account
+ to the source account. If that fails, then guess the from-account
+ based on the recipients. Fixes bug #20479.
+
2002-02-13 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (drag_data_get_cb): Implement.
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 0c10521ad9..fa59e0e254 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -886,7 +886,12 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
mail_ignore_address (composer, to_addrs);
mail_ignore_address (composer, cc_addrs);
-
+
+ /* default 'me' to the source account... */
+ source = camel_mime_message_get_source (message);
+ if (source)
+ me = mail_config_get_account_by_source_url (source);
+
if (mode == REPLY_LIST) {
CamelMessageInfo *info;
const char *mlist;
@@ -928,7 +933,8 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
}
}
- me = guess_me (to_addrs, cc_addrs, accounts);
+ if (!me)
+ me = guess_me (to_addrs, cc_addrs, accounts);
} else {
GHashTable *rcpt_hash;
@@ -954,10 +960,11 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
}
if (mode == REPLY_ALL) {
- cc = list_add_addresses (cc, to_addrs, accounts, rcpt_hash, &me);
+ cc = list_add_addresses (cc, to_addrs, accounts, rcpt_hash, me ? NULL : &me);
cc = list_add_addresses (cc, cc_addrs, accounts, rcpt_hash, me ? NULL : &me);
} else {
- me = guess_me (to_addrs, cc_addrs, accounts);
+ if (!me)
+ me = guess_me (to_addrs, cc_addrs, accounts);
}
g_hash_table_destroy (rcpt_hash);
@@ -971,7 +978,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
} else {
name = _("an unknown sender");
}
-
+
date = camel_mime_message_get_date (message, NULL);
strftime (date_str, sizeof (date_str), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"),
localtime (&date));
@@ -984,13 +991,6 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
g_free (text);
}
}
-
- if (me == NULL) {
- /* as a last resort, set the replying account (aka me)
- to the account this was fetched from */
- source = camel_mime_message_get_source (message);
- me = mail_config_get_account_by_source_url (source);
- }
/* Set the subject of the new message. */
subject = (char *)camel_mime_message_get_subject (message);
@@ -1048,7 +1048,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
} else if (references) {
e_msg_composer_add_header (composer, "References", references);
}
-
+
e_msg_composer_drop_editor_undo (composer);
return composer;
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 580cde5183..f88c3b8924 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -596,7 +596,7 @@ pixbuf_gen_idle (struct _PixbufLoader *pbl)
pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/pgp-signature-nokey.png");
} else
pixbuf = gdk_pixbuf_loader_get_pixbuf (pbl->loader);
-
+
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);