+2008-04-23 [colin] 3.4.0cvs9
+
+ * src/compose.c
+ * src/prefs_folder_item.c
+ * src/prefs_template.c
+ * src/quote_fmt.c
+ Fix bug 1576: Fix unescaping of templates when testing them
+ I think it breaks nothing. (wwp, you're welcome to double-check)
+
2008-04-23 [paul] 3.4.0cvs8
* manual/advanced.xml
( cvs diff -u -r 1.149.2.88 -r 1.149.2.89 src/inc.c; cvs diff -u -r 1.43.2.70 -r 1.43.2.71 src/prefs_matcher.c; cvs diff -u -r 1.17.2.46 -r 1.17.2.47 src/send_message.c; ) > 3.4.0cvs6.patchset
( cvs diff -u -r 1.204.2.165 -r 1.204.2.166 src/prefs_common.c; cvs diff -u -r 1.103.2.106 -r 1.103.2.107 src/prefs_common.h; cvs diff -u -r 1.395.2.364 -r 1.395.2.365 src/summaryview.c; ) > 3.4.0cvs7.patchset
( cvs diff -u -r 1.1.2.46 -r 1.1.2.47 manual/advanced.xml; ) > 3.4.0cvs8.patchset
+( cvs diff -u -r 1.382.2.443 -r 1.382.2.444 src/compose.c; cvs diff -u -r 1.52.2.62 -r 1.52.2.63 src/prefs_folder_item.c; cvs diff -u -r 1.12.2.61 -r 1.12.2.62 src/prefs_template.c; cvs diff -u -r 1.8.2.33 -r 1.8.2.34 src/quote_fmt.c; ) > 3.4.0cvs9.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=8
+EXTRA_VERSION=9
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
}
} else if (GTK_IS_EDITABLE(entry))
gtk_editable_paste_clipboard (GTK_EDITABLE(entry));
-
+
+ compose->modified = TRUE;
}
static void entry_allsel(GtkWidget *entry)
/* save and check formats */
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->new_msg_format_rec_checkbtn))) {
+
prefs->compose_with_format =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_compose_with_format));
prefs->compose_override_from_format = pref_get_pref_from_entry(
prefs->compose_body_format = pref_get_pref_from_textview(
GTK_TEXT_VIEW(page->compose_body_format));
quotefmt_check_new_msg_formats(prefs->compose_with_format,
- prefs->compose_override_from_format,
- prefs->compose_subject_format,
- prefs->compose_body_format);
+ prefs->compose_override_from_format,
+ prefs->compose_subject_format,
+ prefs->compose_body_format);
}
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->reply_format_rec_checkbtn))) {
{
gboolean result = TRUE;
if (string && *string != '\0') {
+ gchar *tmp = NULL;
gchar *parsed_buf;
MsgInfo dummyinfo;
PrefsAccount *account = account_get_default();
+ if (escaped_string) {
+ tmp = malloc(strlen(string)+1);
+ pref_get_unescaped_pref(tmp, string);
+ } else {
+ tmp = g_strdup(string);
+ }
memset(&dummyinfo, 0, sizeof(MsgInfo));
#ifdef USE_ASPELL
- quote_fmt_init(&dummyinfo, NULL, NULL, TRUE, account, escaped_string, NULL);
+ quote_fmt_init(&dummyinfo, NULL, NULL, TRUE, account, FALSE, NULL);
#else
- quote_fmt_init(&dummyinfo, NULL, NULL, TRUE, account, escaped_string);
+ quote_fmt_init(&dummyinfo, NULL, NULL, TRUE, account, FALSE);
#endif
- quote_fmt_scan_string(string);
+ quote_fmt_scan_string(tmp);
quote_fmt_parse();
+ g_free(tmp);
parsed_buf = quote_fmt_get_buffer();
if (!parsed_buf) {
if (line)
g_free(value);
value = NULL;
}
- if (!prefs_template_string_is_valid(value, &line, FALSE, FALSE)) {
+ if (!prefs_template_string_is_valid(value, &line, TRUE, FALSE)) {
alertpanel_error(_("Template body format error at line %d."), line);
g_free(value);
return FALSE;
subject = NULL;
}
- if (!prefs_template_string_is_valid(from, NULL, FALSE, TRUE)) {
+ if (!prefs_template_string_is_valid(from, NULL, TRUE, TRUE)) {
alertpanel_error(_("Template From format error."));
g_free(from);
g_free(value);
return FALSE;
}
- if (!prefs_template_string_is_valid(to, NULL, FALSE, TRUE)) {
+ if (!prefs_template_string_is_valid(to, NULL, TRUE, TRUE)) {
alertpanel_error(_("Template To format error."));
g_free(to);
g_free(value);
return FALSE;
}
- if (!prefs_template_string_is_valid(cc, NULL, FALSE, TRUE)) {
+ if (!prefs_template_string_is_valid(cc, NULL, TRUE, TRUE)) {
alertpanel_error(_("Template Cc format error."));
g_free(cc);
g_free(value);
return FALSE;
}
- if (!prefs_template_string_is_valid(bcc, NULL, FALSE, TRUE)) {
+ if (!prefs_template_string_is_valid(bcc, NULL, TRUE, TRUE)) {
alertpanel_error(_("Template Bcc format error."));
g_free(bcc);
g_free(value);
return FALSE;
}
- if (!prefs_template_string_is_valid(subject, NULL, FALSE, FALSE)) {
+ if (!prefs_template_string_is_valid(subject, NULL, TRUE, FALSE)) {
alertpanel_error(_("Template subject format error."));
g_free(subject);
g_free(value);
}
void quotefmt_check_new_msg_formats(gboolean use_format,
- gchar *override_from_fmt,
- gchar *subject_fmt,
- gchar *body_fmt)
+ gchar *override_from_fmt,
+ gchar *subject_fmt,
+ gchar *body_fmt)
{
if (use_format) {
gint line;
- if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, FALSE, TRUE))
+ if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, TRUE, TRUE))
alertpanel_error(_("New message From format error."));
- if (!prefs_template_string_is_valid(subject_fmt, NULL, FALSE, FALSE))
+ if (!prefs_template_string_is_valid(subject_fmt, NULL, TRUE, FALSE))
alertpanel_error(_("New message subject format error."));
if (!prefs_template_string_is_valid(body_fmt, &line, TRUE, FALSE)) {
}
void quotefmt_check_reply_formats(gboolean use_format,
- gchar *override_from_fmt,
- gchar *quotation_mark,
- gchar *body_fmt)
+ gchar *override_from_fmt,
+ gchar *quotation_mark,
+ gchar *body_fmt)
{
if (use_format) {
gint line;
- if (!prefs_template_string_is_valid(quotation_mark, NULL, FALSE, FALSE))
+ if (!prefs_template_string_is_valid(quotation_mark, NULL, TRUE, FALSE))
alertpanel_error(_("Message reply quotation mark format error."));
- if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, FALSE, TRUE))
+ if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, TRUE, TRUE))
alertpanel_error(_("Message reply From format error."));
if (!prefs_template_string_is_valid(body_fmt, &line, TRUE, FALSE)) {
}
void quotefmt_check_forward_formats(gboolean use_format,
- gchar *override_from_fmt,
- gchar *quotation_mark,
- gchar *body_fmt)
+ gchar *override_from_fmt,
+ gchar *quotation_mark,
+ gchar *body_fmt)
{
if (use_format) {
gint line;
- if (!prefs_template_string_is_valid(quotation_mark, NULL, FALSE, FALSE))
+ if (!prefs_template_string_is_valid(quotation_mark, NULL, TRUE, FALSE))
alertpanel_error(_("Message forward quotation mark format error."));
- if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, FALSE, TRUE))
+ if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, TRUE, TRUE))
alertpanel_error(_("Message forward From format error."));
if (!prefs_template_string_is_valid(body_fmt, &line, TRUE, FALSE)) {