fix bug [642731] 'Wrong selected account with drafted mail'
authorPaul Mangan <paul@claws-mail.org>
Sat, 30 Nov 2002 15:26:18 +0000 (15:26 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 30 Nov 2002 15:26:18 +0000 (15:26 +0000)
ChangeLog.claws
configure.in
src/compose.c

index fd5f94996b32275a8d19195eff7bf2a642d33929..0849e7f2e11369e1e0aecfca1c1ebdfb06c52266 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-30 [paul]      0.8.6claws40
+
+       * src/compose.c
+               fix bug [642731] 'Wrong selected account with drafted mail'
+
 2002-11-29 [oliver]    0.8.6claws39
        
        * src/messageview.c
index 97c6a4a18159edeb1efdea3fb2a863972fbd00c6..d52aca33ed5d4f3159c7f5a4a544b333c4ce898a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws39
+EXTRA_VERSION=claws40
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index befcf40185ea21519c0d4f687bb1e01444a16c3c..48502329d658210eacd372b3f17a883604fe0e02 100644 (file)
@@ -1160,11 +1160,11 @@ void compose_reedit(MsgInfo *msginfo)
 
                /* Select Account from queue headers */
                if (!get_header_from_msginfo(msginfo, queueheader_buf, 
-                                            sizeof(queueheader_buf), "H_X_SYLPHEED_ACCOUNT_ID:")) {
-                       id = atoi(&queueheader_buf[5]);
+                                            sizeof(queueheader_buf), "X-Sylpheed-Account-Id:")) {
+                       id = atoi(&queueheader_buf[22]);
                        account = account_find_from_id(id);
                }
-               if (!get_header_from_msginfo(msginfo, queueheader_buf, 
+               if (!account && !get_header_from_msginfo(msginfo, queueheader_buf, 
                                             sizeof(queueheader_buf), "NAID:")) {
                        id = atoi(&queueheader_buf[5]);
                        account = account_find_from_id(id);
@@ -3898,6 +3898,7 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
 
        /* Save draft infos */
        if (is_draft) {
+               fprintf(fp, "X-Sylpheed-Account-Id:%d\n", compose->account->account_id);
                fprintf(fp, "S:%s\n", compose->account->address);
                if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(compose->savemsg_checkbtn))) {
                        gchar *savefolderid;
@@ -4105,10 +4106,6 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
                        procmime_get_encoding_str(encoding));
        }
 
-       /* X-Sylpheed header */
-       if (is_draft)
-               fprintf(fp, "X-Sylpheed-Account-Id: %d\n",
-                       compose->account->account_id);
        /* PRIORITY */
        switch (compose->priority) {
                case PRIORITY_HIGHEST: fprintf(fp, "Importance: high\n"