2004-09-02 [colin] 0.9.12cvs90.1
authorColin Leroy <colin@colino.net>
Thu, 2 Sep 2004 13:25:53 +0000 (13:25 +0000)
committerColin Leroy <colin@colino.net>
Thu, 2 Sep 2004 13:25:53 +0000 (13:25 +0000)
* src/account.c
Sync with HEAD (fix bug 582)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/account.c

index 14a3d991b18b7c2066ac0897b88dc32ae103a996..7a8c4c0af34bf286f53bab010be5dea5a42f12d2 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-02 [colin]     0.9.12cvs90.1
+
+       * src/account.c
+               Sync with HEAD (fix bug 582)
+
 2004-09-02 [colin]     0.9.12cvs89.1
 
        * src/addrindex.c
 2004-09-02 [colin]     0.9.12cvs89.1
 
        * src/addrindex.c
index e882993c9d7a897ecaf9b46597596e3aed049705..1c706b964a48fa8387477eb079addc1b471c8d3f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.5.2.3 -r 1.5.2.4 src/prefs_spelling.c; ) > 0.9.12cvs87.1.patchset
 ( cvs diff -u -r 1.3.2.2 -r 1.3.2.3 src/ldapquery.c; ) > 0.9.12cvs88.1.patchset
 ( cvs diff -u -r 1.28.2.2 -r 1.28.2.3 src/addrindex.c; ) > 0.9.12cvs89.1.patchset
 ( cvs diff -u -r 1.5.2.3 -r 1.5.2.4 src/prefs_spelling.c; ) > 0.9.12cvs87.1.patchset
 ( cvs diff -u -r 1.3.2.2 -r 1.3.2.3 src/ldapquery.c; ) > 0.9.12cvs88.1.patchset
 ( cvs diff -u -r 1.28.2.2 -r 1.28.2.3 src/addrindex.c; ) > 0.9.12cvs89.1.patchset
+( cvs diff -u -r 1.61.2.8 -r 1.61.2.9 src/account.c; ) > 0.9.12cvs90.1.patchset
index c8b99464fc232f1bf4173a069a3e3b9ecec43c1c..5e1502bed4f94859746e0df4e1e31ec37eccacdc 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=89
+EXTRA_VERSION=90
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=.1
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=.1
 
index 98ae1f3b46d4a357ded243f59a86b48b31df0dd4..de192d1fbffb6a99f777daab8a0b5d8e50c1de02 100644 (file)
@@ -1168,18 +1168,31 @@ PrefsAccount *account_get_reply_account(MsgInfo *msginfo, gboolean reply_autosel
        
        /* select account by to: and cc: header if enabled */
        if (reply_autosel) {
        
        /* select account by to: and cc: header if enabled */
        if (reply_autosel) {
-               if (!account && msginfo->to) {
-                       gchar *to;
-                       Xstrdup_a(to, msginfo->to, return NULL);
-                       extract_address(to);
-                       account = account_find_from_address(to);
-               }
-               if (!account) {
-                       gchar cc[BUFFSIZE];
-                       if (!procheader_get_header_from_msginfo(msginfo, cc, sizeof(cc), "CC:")) { /* Found a CC header */
-                               extract_address(cc);
-                               account = account_find_from_address(cc);
-                       }        
+               gchar * field = NULL;
+               int fieldno = 0;
+               for (field = msginfo->to; fieldno++ < 2; field = msginfo->cc) {
+                       printf("search %s (%d)\n", field, fieldno);
+                       if (!account && field) {
+                               gchar *to = NULL;
+                               printf("finding from %s\n", field);
+                               if (!strchr(field, ',')) {
+                                       Xstrdup_a(to, field, return NULL);
+                                       extract_address(to);
+                                       account = account_find_from_address(to);
+                               } else {
+                                       gchar **split = g_strsplit(field, ",", -1);
+                                       int i = -1;
+                                       do {
+                                               i++;
+                                               if (!split[i])
+                                                       break;
+                                               Xstrdup_a(to, split[i], return NULL);
+                                               extract_address(to);
+                                               account = account_find_from_address(to);
+                                       } while (!account);
+                                       g_strfreev(split);
+                               }
+                       }
                }
        }
 
                }
        }