commit cd04a0e0c0d2eff4e54e172d1d0623d15443f284
parent f1a9ea8ff51012e7f6d705dd95328078b18afe11
Author: Colin Leroy <colin@colino.net>
Date: Tue, 19 Aug 2008 17:02:41 +0000
2008-08-19 [colin] 3.5.0cvs64
* src/compose.c
Save Autowrap status in drafts/queued mails
Diffstat:
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -3475,3 +3475,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/compose.c b/src/compose.c
@@ -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);