2008-08-19 [colin] 3.5.0cvs64
authorColin Leroy <colin@colino.net>
Tue, 19 Aug 2008 17:02:41 +0000 (17:02 +0000)
committerColin Leroy <colin@colino.net>
Tue, 19 Aug 2008 17:02:41 +0000 (17:02 +0000)
* src/compose.c
Save Autowrap status in drafts/queued mails

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 8e5cb82e65c35e0b8167a4d907ae9c7c981067fa..956c4462a66c27868c44f33e7640ff5652bcc698 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-19 [colin]     3.5.0cvs64
+
+       * src/compose.c
+               Save Autowrap status in drafts/queued mails
+
 2008-08-19 [colin]     3.5.0cvs63
 
        * src/mainwindow.c
index 83bef99cd37aaedaeded9369f5d5677bbff5f8e2..cf2b4501b237af32407ae94b3bc54d145b53bd17 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/editaddress_other_attributes_ldap.h;  ) > 3.5.0cvs61.patchset
 ( cvs diff -u -r 1.60.2.60 -r 1.60.2.61 src/prefs_actions.c;  cvs diff -u -r 1.49.2.112 -r 1.49.2.113 src/procmime.c;  cvs diff -u -r 1.1.2.73 -r 1.1.2.74 src/wizard.c;  cvs diff -u -r 1.13.2.19 -r 1.13.2.20 src/common/socket.h;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/gtk/gtkcmctree.c;  ) > 3.5.0cvs62.patchset
 ( cvs diff -u -r 1.274.2.267 -r 1.274.2.268 src/mainwindow.c;  ) > 3.5.0cvs63.patchset
+( cvs diff -u -r 1.382.2.466 -r 1.382.2.467 src/compose.c;  ) > 3.5.0cvs64.patchset
index fa4e6607eb52467415c2ba45d481757582766de9..6e24e86a194551b59a51f22513c2d62ac56688f8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=63
+EXTRA_VERSION=64
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1223bb9487dddbf68b2f977cd92ba94b9b8c8066..cfdb94cfe6af2d10457e62f630db105cf519646d 100644 (file)
@@ -1958,6 +1958,7 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch)
        gchar *privacy_system = NULL;
        int priority = PRIORITY_NORMAL;
        MsgInfo *replyinfo = NULL, *fwdinfo = NULL;
+       gboolean autowrap = prefs_common.autowrap;
 
        g_return_val_if_fail(msginfo != NULL, NULL);
        g_return_val_if_fail(msginfo->folder != NULL, NULL);
@@ -2018,6 +2019,11 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch)
                        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-Auto-Wrapping:")) {
+                       param = atoi(&queueheader_buf[strlen("X-Claws-Auto-Wrapping:")]);
+                       autowrap = 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:")]);
@@ -2070,7 +2076,9 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch)
        g_return_val_if_fail(account != NULL, NULL);
 
        compose = compose_create(account, msginfo->folder, COMPOSE_REEDIT, batch);
-       
+
+       cm_toggle_menu_set_active_full(compose->ui_manager, "Menu/Edit/AutoWrap", autowrap);
+       compose->autowrap = autowrap;
        compose->replyinfo = replyinfo;
        compose->fwdinfo = fwdinfo;
 
@@ -4947,6 +4955,7 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
                "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-Account-Id:",
+               "X-Claws-Auto-Wrapping:",
                NULL
                };
        if ((fp = g_fopen(compose->redirect_filename, "rb")) == NULL) {
@@ -5528,6 +5537,8 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
                g_free(folderid);
        }
 
+       err |= (fprintf(fp, "X-Claws-Auto-Wrapping:%d\n", compose->autowrap) < 0);
+
        /* end of headers */
        err |= (fprintf(fp, "X-Claws-End-Special-Headers: 1\n") < 0);
 
@@ -7314,7 +7325,6 @@ static void compose_set_priority_cb(GtkAction *action, GtkRadioAction *current,
        gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
        Compose *compose = (Compose *) data;
        if (active) {
-               printf("activated %d\n", value);
                compose->priority = value;
        }
 }
@@ -8892,6 +8902,8 @@ gboolean compose_draft (gpointer data, guint action)
                g_free(folderid);
        }
 
+       err |= (fprintf(fp, "X-Claws-Auto-Wrapping:%d\n", compose->autowrap) < 0);
+
        /* end of headers */
        err |= (fprintf(fp, "X-Claws-End-Special-Headers: 1\n") < 0);