aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-06 20:36:04 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-06 20:36:04 +0800
commit8c43300eb94338a336c619dcd55c13763f013459 (patch)
tree05c161fd5b1619702eaa07ca22cc97b2c353172f
parent1ce0ee997b7fe65d2146d474d70233f0c1775539 (diff)
parentc5a30946507e23cf01e3657d076bde73f0a519a9 (diff)
downloadgsoc2013-evolution-8c43300eb94338a336c619dcd55c13763f013459.tar
gsoc2013-evolution-8c43300eb94338a336c619dcd55c13763f013459.tar.gz
gsoc2013-evolution-8c43300eb94338a336c619dcd55c13763f013459.tar.bz2
gsoc2013-evolution-8c43300eb94338a336c619dcd55c13763f013459.tar.lz
gsoc2013-evolution-8c43300eb94338a336c619dcd55c13763f013459.tar.xz
gsoc2013-evolution-8c43300eb94338a336c619dcd55c13763f013459.tar.zst
gsoc2013-evolution-8c43300eb94338a336c619dcd55c13763f013459.zip
Merge branch 'master' into vcard-inline
-rw-r--r--mail/ChangeLog16
-rw-r--r--mail/em-composer-utils.c27
2 files changed, 32 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 359083a65e..90dceba510 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,19 @@
+2009-05-06 Jeff Cai <jeff.cai@sun.com>
+
+ ** Fix for bug #524497
+ * em-composer-utils.c: (guess_account):
+ Change the order getting an account
+
+ The original order is:
+ 1. The account in 'To' of the message.
+ 2. The account of the message source.
+ 3. The account of the folder source.
+
+ The new order is:
+ 1. The account of the folder source.
+ 2. The account of the message source.
+ 3. The account in "To' of the message
+
2009-04-28 Milan Crha <mcrha@redhat.com>
** Fix for bug #572348
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 38f35d1b5b..0425645abe 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1861,7 +1861,22 @@ guess_account (CamelMimeMessage *message, CamelFolder *folder)
&& (account = guess_account_folder(folder)))
return account;
- /* then recipient (to/cc) in account table */
+ /* check for source folder */
+ if (folder) {
+ account = guess_account_folder(folder);
+ if (account)
+ return account;
+ }
+
+ /* then message source */
+ if (account == NULL
+ && (tmp = camel_mime_message_get_source(message))) {
+ account = mail_config_get_account_by_source_url(tmp);
+ if (account)
+ return account;
+ }
+
+ /* finally recipient (to/cc) in account table */
account_hash = generate_account_hash ();
for (j=0;account == NULL && j<2;j++) {
const CamelInternetAddress *to;
@@ -1877,16 +1892,6 @@ guess_account (CamelMimeMessage *message, CamelFolder *folder)
}
g_hash_table_destroy(account_hash);
- /* then message source */
- if (account == NULL
- && (tmp = camel_mime_message_get_source(message)))
- account = mail_config_get_account_by_source_url(tmp);
-
- /* and finally, source folder */
- if (account == NULL
- && folder)
- account = guess_account_folder(folder);
-
return account;
}