2006-12-06 [paul] 2.6.1cvs9
authorPaul Mangan <paul@claws-mail.org>
Wed, 6 Dec 2006 08:18:34 +0000 (08:18 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 6 Dec 2006 08:18:34 +0000 (08:18 +0000)
* src/compose.c
* src/messageview.c
* src/procheader.c
* src/procmime.c
* src/procmsg.c
* src/textview.c
more renaming
Thanks to Colin

ChangeLog
PATCHSETS
configure.ac
src/compose.c
src/messageview.c
src/procheader.c
src/procmime.c
src/procmsg.c
src/textview.c

index e0adf0ef80a6e5946a6f236ca4ad76dc573d101e..4607be67a1b740c798a7adc6e5c658743769b06f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-12-06 [paul]      2.6.1cvs9
+
+       * src/compose.c
+       * src/messageview.c
+       * src/procheader.c
+       * src/procmime.c
+       * src/procmsg.c
+       * src/textview.c
+               more renaming
+               Thanks to Colin
+
 2006-12-06 [colin]     2.6.1cvs8
 
        * src/ssl_manager.c
index 56fb65d1aad1a2d24e47cfd51985791ffe029b41..bfa382a554b8dc17a72a6626beb34cc1f71df31a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.136 -r 1.207.2.137 src/folderview.c;  ) > 2.6.1cvs6.patchset
 ( cvs diff -u -r 1.1.4.58 -r 1.1.4.59 src/etpan/imap-thread.c;  ) > 2.6.1cvs7.patchset
 ( cvs diff -u -r 1.3.2.23 -r 1.3.2.24 src/ssl_manager.c;  cvs diff -u -r 1.4.2.13 -r 1.4.2.14 src/common/ssl_certificate.c;  cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/common/ssl_certificate.h;  ) > 2.6.1cvs8.patchset
+( cvs diff -u -r 1.382.2.339 -r 1.382.2.340 src/compose.c;  cvs diff -u -r 1.94.2.110 -r 1.94.2.111 src/messageview.c;  cvs diff -u -r 1.47.2.36 -r 1.47.2.37 src/procheader.c;  cvs diff -u -r 1.49.2.83 -r 1.49.2.84 src/procmime.c;  cvs diff -u -r 1.150.2.84 -r 1.150.2.85 src/procmsg.c;  cvs diff -u -r 1.96.2.160 -r 1.96.2.161 src/textview.c;  ) > 2.6.1cvs9.patchset
index 2b8848ce86d787764daa80d145ac14c6560048e1..a49fa2175ff3ac480968f4dd00163ffcf7570c04 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=8
+EXTRA_VERSION=9
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 4608b04daee087c1fe6b9f0c1d037d92d4ba9f3e..db53d1b14faa968c84a6749915486aaf4dbca49f 100644 (file)
@@ -1772,6 +1772,11 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch)
                gint id, param;
 
                /* Select Account from queue headers */
+               if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Claws-Account-Id:")) {
+                       id = atoi(&queueheader_buf[strlen("X-Claws-Account-Id:")]);
+                       account = account_find_from_id(id);
+               }
                if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                             sizeof(queueheader_buf), "X-Sylpheed-Account-Id:")) {
                        id = atoi(&queueheader_buf[strlen("X-Sylpheed-Account-Id:")]);
@@ -1791,17 +1796,32 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch)
                                                                sizeof(queueheader_buf), "S:")) {
                        account = account_find_from_address(queueheader_buf);
                }
+               if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Claws-Sign:")) {
+                       param = atoi(&queueheader_buf[strlen("X-Claws-Sign:")]);
+                       use_signing = param;
+                       
+               }
                if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                             sizeof(queueheader_buf), "X-Sylpheed-Sign:")) {
                        param = atoi(&queueheader_buf[strlen("X-Sylpheed-Sign:")]);
                        use_signing = param;
                        
                }
+               if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Claws-Encrypt:")) {
+                       param = atoi(&queueheader_buf[strlen("X-Claws-Encrypt:")]);
+                       use_encryption = param;
+               }
                if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                             sizeof(queueheader_buf), "X-Sylpheed-Encrypt:")) {
                        param = atoi(&queueheader_buf[strlen("X-Sylpheed-Encrypt:")]);
                        use_encryption = param;
                }
+                if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
+                                            sizeof(queueheader_buf), "X-Claws-Privacy-System:")) {
+                        privacy_system = g_strdup(&queueheader_buf[strlen("X-Claws-Privacy-System:")]);
+                }
                 if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, 
                                             sizeof(queueheader_buf), "X-Sylpheed-Privacy-System:")) {
                         privacy_system = g_strdup(&queueheader_buf[strlen("X-Sylpheed-Privacy-System:")]);
@@ -4543,8 +4563,10 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
                "SSH:",                 "R:",                   "MAID:",
                "NAID:",                "RMID:",                "FMID:",
                "SCF:",                 "RRCPT:",               "NG:",
+               "X-Claws-Privacy",      "X-Claws-Sign:",        "X-Claws-Encrypt",
+               "X-Claws-End-Special-Headers:",                 "X-Claws-Account-Id:",
                "X-Sylpheed-Privacy",   "X-Sylpheed-Sign:",     "X-Sylpheed-Encrypt",
-               "X-Sylpheed-End-Special-Headers:",
+               "X-Sylpheed-End-Special-Headers:",              "X-Sylpheed-Account-Id:",
                NULL
                };
        if ((fp = g_fopen(compose->redirect_filename, "rb")) == NULL) {
@@ -5024,8 +5046,8 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
 
        
        if (compose->privacy_system != NULL) {
-               fprintf(fp, "X-Sylpheed-Privacy-System:%s\n", compose->privacy_system);
-               fprintf(fp, "X-Sylpheed-Sign:%d\n", compose->use_signing);
+               fprintf(fp, "X-Claws-Privacy-System:%s\n", compose->privacy_system);
+               fprintf(fp, "X-Claws-Sign:%d\n", compose->use_signing);
                if (compose->use_encryption) {
                        gchar *encdata;
                        if (mailac && mailac->encrypt_to_self) {
@@ -5038,12 +5060,12 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
                        }
                        if (encdata != NULL) {
                                if (strcmp(encdata, "_DONT_ENCRYPT_")) {
-                                       fprintf(fp, "X-Sylpheed-Encrypt:%d\n", compose->use_encryption);
-                                       fprintf(fp, "X-Sylpheed-Encrypt-Data:%s\n", 
+                                       fprintf(fp, "X-Claws-Encrypt:%d\n", compose->use_encryption);
+                                       fprintf(fp, "X-Claws-Encrypt-Data:%s\n", 
                                                encdata);
                                } /* else we finally dont want to encrypt */
                        } else {
-                               fprintf(fp, "X-Sylpheed-Encrypt:%d\n", compose->use_encryption);
+                               fprintf(fp, "X-Claws-Encrypt:%d\n", compose->use_encryption);
                                /* and if encdata was null, it means there's been a problem in 
                                 * key selection */
                                lock = FALSE;
@@ -5086,7 +5108,7 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
        }
 
        /* end of headers */
-       fprintf(fp, "X-Sylpheed-End-Special-Headers: 1\n");
+       fprintf(fp, "X-Claws-End-Special-Headers: 1\n");
 
        if (compose->redirect_filename != NULL) {
                if (compose_redirect_write_to_file(compose, fp) < 0) {
@@ -7957,7 +7979,7 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
        }
 
        /* Save draft infos */
-       fprintf(fp, "X-Sylpheed-Account-Id:%d\n", compose->account->account_id);
+       fprintf(fp, "X-Claws-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))) {
@@ -7971,9 +7993,9 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
                fprintf(fp, "RRCPT:1\n");
        }
        if (compose->privacy_system) {
-               fprintf(fp, "X-Sylpheed-Sign:%d\n", compose->use_signing);
-               fprintf(fp, "X-Sylpheed-Encrypt:%d\n", compose->use_encryption);
-               fprintf(fp, "X-Sylpheed-Privacy-System:%s\n", compose->privacy_system);
+               fprintf(fp, "X-Claws-Sign:%d\n", compose->use_signing);
+               fprintf(fp, "X-Claws-Encrypt:%d\n", compose->use_encryption);
+               fprintf(fp, "X-Claws-Privacy-System:%s\n", compose->privacy_system);
        }
 
        /* Message-ID of message replying to */
@@ -7994,7 +8016,7 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
        }
 
        /* end of headers */
-       fprintf(fp, "X-Sylpheed-End-Special-Headers: 1\n");
+       fprintf(fp, "X-Claws-End-Special-Headers: 1\n");
 
        if (compose_write_to_file(compose, fp, COMPOSE_WRITE_FOR_STORE, action != COMPOSE_AUTO_SAVE) < 0) {
                fclose(fp);
index 461c271f3582a2beaf991c1b00582a8cf8c192fa..e2be8703abdab6d2c484d5b4b80f2da2d056eb4e 100644 (file)
@@ -666,7 +666,7 @@ static gint disposition_notification_send(MsgInfo *msginfo)
                g_free(path);
        }               
 
-       fprintf(fp, "X-Sylpheed-End-Special-Headers: 1\n");
+       fprintf(fp, "X-Claws-End-Special-Headers: 1\n");
        
        /* Date */
        get_rfc822_date(buf, sizeof(buf));
index dae95bdf5f563bcbc9220f869db1c445c4cbe6c7..b6f186f939e022b64addc8efb26c64f16a398519 100644 (file)
@@ -449,8 +449,10 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
 
        if (MSG_IS_QUEUED(flags) || MSG_IS_DRAFT(flags)) {
                while (get_one_field(buf, sizeof(buf), data, NULL) != -1) {
-                       if (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
-                               strlen("X-Sylpheed-End-Special-Headers:")))
+                       if ((!strncmp(buf, "X-Claws-End-Special-Headers: 1",
+                               strlen("X-Claws-End-Special-Headers:"))) ||
+                           (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
+                               strlen("X-Sylpheed-End-Special-Headers:"))))
                                break;
                        /* from other mailers */
                        if (!strncmp(buf, "Date: ", 6)
index 0ba724bc23972302bda94828614a652ba37f3a32..29f6a67b61464c364cbadcad769b93f00e5531b2 100644 (file)
@@ -1899,8 +1899,10 @@ MimeInfo *procmime_scan_queue_file(const gchar *filename)
        /* Skip queue header */
        while (fgets(buf, sizeof(buf), fp) != NULL) {
                /* new way */
-               if (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
-                       strlen("X-Sylpheed-End-Special-Headers:")))
+               if ((!strncmp(buf, "X-Claws-End-Special-Headers: 1",
+                       strlen("X-Claws-End-Special-Headers:"))) ||
+                  (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
+                       strlen("X-Sylpheed-End-Special-Headers:"))))
                        break;
                /* old way */
                if (buf[0] == '\r' || buf[0] == '\n') break;
index 5016fdbb65f88b7d551f28701f8b89408d97047a..ea8b3b04cc4fcd7b2f8566ae4a4f18f7fc14e1e2 100644 (file)
@@ -65,7 +65,11 @@ enum
        Q_PRIVACY_SYSTEM   = 9,
        Q_ENCRYPT          = 10,
        Q_ENCRYPT_DATA     = 11,
-       Q_CLAWS_HDRS    = 12,
+       Q_CLAWS_HDRS       = 12,
+       Q_PRIVACY_SYSTEM_OLD = 13,
+       Q_ENCRYPT_OLD        = 14,
+       Q_ENCRYPT_DATA_OLD   = 15,
+       Q_CLAWS_HDRS_OLD     = 16,
 };
 
 GHashTable *procmsg_msg_hash_table_create(GSList *mlist)
@@ -550,8 +554,10 @@ FILE *procmsg_open_message(MsgInfo *msginfo)
 
                while (fgets(buf, sizeof(buf), fp) != NULL) {
                        /* new way */
-                       if (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
-                               strlen("X-Sylpheed-End-Special-Headers:")))
+                       if ((!strncmp(buf, "X-Claws-End-Special-Headers: 1",
+                               strlen("X-Claws-End-Special-Headers:"))) ||
+                           (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
+                               strlen("X-Sylpheed-End-Special-Headers:"))))
                                break;
                        /* old way */
                        if (buf[0] == '\r' || buf[0] == '\n') break;
@@ -773,6 +779,10 @@ static PrefsAccount *procmsg_get_account_from_file(const gchar *file)
                                       {"SCF:",  NULL, FALSE},
                                       {"RMID:", NULL, FALSE},
                                       {"FMID:", NULL, FALSE},
+                                      {"X-Claws-Privacy-System:", NULL, FALSE},
+                                      {"X-Claws-Encrypt:", NULL, FALSE},
+                                      {"X-Claws-Encrypt-Data:", NULL, FALSE},
+                                      {"X-Claws-End-Special-Headers",    NULL, FALSE},
                                       {"X-Sylpheed-Privacy-System:", NULL, FALSE},
                                       {"X-Sylpheed-Encrypt:", NULL, FALSE},
                                       {"X-Sylpheed-Encrypt-Data:", NULL, FALSE},
@@ -1038,8 +1048,10 @@ gint procmsg_remove_special_headers(const gchar *in, const gchar *out)
        }
        while (fgets(buf, sizeof(buf), fp) != NULL) {
                /* new way */
-               if (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
-                       strlen("X-Sylpheed-End-Special-Headers:")))
+               if ((!strncmp(buf, "X-Claws-End-Special-Headers: 1",
+                       strlen("X-Claws-End-Special-Headers:"))) ||
+                   (!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
+                       strlen("X-Sylpheed-End-Special-Headers:"))))
                        break;
                /* old way */
                if (buf[0] == '\r' || buf[0] == '\n') break;
@@ -1464,6 +1476,10 @@ static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_ses
                                       {"SCF:",  NULL, FALSE},
                                       {"RMID:", NULL, FALSE},
                                       {"FMID:", NULL, FALSE},
+                                      {"X-Claws-Privacy-System:", NULL, FALSE},
+                                      {"X-Claws-Encrypt:", NULL, FALSE},
+                                      {"X-Claws-Encrypt-Data:", NULL, FALSE},
+                                      {"X-Claws-End-Special-Headers:", NULL, FALSE},
                                       {"X-Sylpheed-Privacy-System:", NULL, FALSE},
                                       {"X-Sylpheed-Encrypt:", NULL, FALSE},
                                       {"X-Sylpheed-Encrypt-Data:", NULL, FALSE},
@@ -1539,18 +1555,22 @@ static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_ses
                                fwdmessageid = g_strdup(p);
                        break;
                case Q_PRIVACY_SYSTEM:
+               case Q_PRIVACY_SYSTEM_OLD:
                        if (privacy_system == NULL) 
                                privacy_system = g_strdup(p);
                        break;
                case Q_ENCRYPT:
+               case Q_ENCRYPT_OLD:
                        if (p[0] == '1') 
                                encrypt = TRUE;
                        break;
                case Q_ENCRYPT_DATA:
+               case Q_ENCRYPT_DATA_OLD:
                        if (encrypt_data == NULL) 
                                encrypt_data = g_strdup(p);
                        break;
                case Q_CLAWS_HDRS:
+               case Q_CLAWS_HDRS_OLD:
                        /* end of special headers reached */
                        goto send_mail; /* can't "break;break;" */
                }
index ae0502cd855d9f9a14789a1497af93a7c06041a5..2a02d86e996e856819c80015e4e0595b7bce057c 100644 (file)
@@ -1650,6 +1650,8 @@ static gboolean header_is_internal(Header *header)
                {"AF:", "NF:", "PS:", "SRH:", "SFN:", "DSR:", "MID:", 
                 "CFG:", "PT:", "S:", "RQ:", "SSV:", "NSV:", "SSH:", 
                 "R:", "MAID:", "SCF:", "RMID:", "FMID:", "NAID:", 
+                "X-Claws-Account-Id:", "X-Claws-Sign:", "X-Claws-Encrypt:", 
+                "X-Claws-Privacy-System:", "X-Claws-End-Special-Headers:",
                 "X-Sylpheed-Account-Id:", "X-Sylpheed-Sign:", "X-Sylpheed-Encrypt:", 
                 "X-Sylpheed-Privacy-System:", "X-Sylpheed-End-Special-Headers:",
                 NULL};