#include "message_search.h"
#include "combobox.h"
#include "hooks.h"
+#include "privacy.h"
enum
{
pref_get_unescaped_pref(tmp, prefs_common.compose_subject_format);
subject = gtk_editable_get_chars(GTK_EDITABLE(compose->subject_entry), 0, -1);
+#ifdef USE_ASPELL
+ quote_fmt_init(dummyinfo, NULL, subject, FALSE, compose->account,
+ compose->gtkaspell);
+#else
quote_fmt_init(dummyinfo, NULL, subject, FALSE, compose->account);
+#endif
quote_fmt_scan_string(tmp);
quote_fmt_parse();
compose_quote_fmt(compose, dummyinfo,
prefs_common.compose_body_format,
NULL, tmp, FALSE, TRUE,
- _("New message body format error."));
+ _("New message body format error at line %d."));
quote_fmt_reset_vartable();
g_free(tmp);
compose_quote_fmt(compose, compose->replyinfo,
prefs_common.quotefmt,
qmark, body, FALSE, TRUE,
- _("Message reply format error."));
+ _("Message reply format error at line %d."));
quote_fmt_reset_vartable();
}
if (procmime_msginfo_is_encrypted(compose->replyinfo)) {
compose_quote_fmt(compose, full_msginfo,
prefs_common.fw_quotefmt,
qmark, body, FALSE, TRUE,
- _("Message forward format error."));
+ _("Message forward format error at line %d."));
quote_fmt_reset_vartable();
compose_attach_parts(compose, msginfo);
gtk_editable_set_editable(GTK_EDITABLE(compose->subject_entry), FALSE);
compose_quote_fmt(compose, msginfo, "%M", NULL, NULL, FALSE, FALSE,
- _("Message redirect format error."));
+ _("Message redirect format error at line %d."));
quote_fmt_reset_vartable();
gtk_text_view_set_editable(GTK_TEXT_VIEW(compose->text), FALSE);
}
if (qmark != NULL) {
+#ifdef USE_ASPELL
+ quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account,
+ compose->gtkaspell);
+#else
quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account);
+#endif
quote_fmt_scan_string(qmark);
quote_fmt_parse();
while (*trimmed_body == '\n')
trimmed_body++;
+#ifdef USE_ASPELL
+ quote_fmt_init(msginfo, quote_str, trimmed_body, FALSE, compose->account,
+ compose->gtkaspell);
+#else
quote_fmt_init(msginfo, quote_str, trimmed_body, FALSE, compose->account);
+#endif
if (need_unescape) {
gchar *tmp = NULL;
buf = quote_fmt_get_buffer();
if (buf == NULL) {
- alertpanel_error(err_msg);
+ gint line = quote_fmt_get_line();
+ gchar *msg = g_strdup_printf(err_msg, line);
+ alertpanel_error(msg);
+ g_free(msg);
goto error;
}
} else
g_free(msgpath);
}
if (!discard_window) {
- compose->sending = FALSE;
- compose_allow_user_actions (compose, TRUE);
if (val != 0) {
if (!queued_removed)
folder_item_remove_msg(folder, msgnum);
procmsg_msginfo_free(tmp);
}
}
- if (!discard_window)
+ if (!discard_window) {
+ compose->sending = FALSE;
+ compose_allow_user_actions (compose, TRUE);
compose_close(compose);
+ }
} else {
if (errstr) {
gchar *tmp = g_strdup_printf(_("%s\nUse \"Send queued messages\" from "
gchar *qmark;
gchar *parsed_str = NULL;
gint cursor_pos = 0;
- const gchar *err_msg = _("Template body format error.");
+ const gchar *err_msg = _("Template body format error at line %d.");
if (!tmpl) return;
/* process the body */
}
if (tmpl->to && *tmpl->to != '\0') {
+#ifdef USE_ASPELL
+ quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account,
+ compose->gtkaspell);
+#else
quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account);
+#endif
quote_fmt_scan_string(tmpl->to);
quote_fmt_parse();
}
if (tmpl->cc && *tmpl->cc != '\0') {
+#ifdef USE_ASPELL
+ quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account,
+ compose->gtkaspell);
+#else
quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account);
+#endif
quote_fmt_scan_string(tmpl->cc);
quote_fmt_parse();
}
if (tmpl->bcc && *tmpl->bcc != '\0') {
+#ifdef USE_ASPELL
+ quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account,
+ compose->gtkaspell);
+#else
quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account);
+#endif
quote_fmt_scan_string(tmpl->bcc);
quote_fmt_parse();
/* process the subject */
if (tmpl->subject && *tmpl->subject != '\0') {
+#ifdef USE_ASPELL
+ quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account,
+ compose->gtkaspell);
+#else
quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account);
+#endif
quote_fmt_scan_string(tmpl->subject);
quote_fmt_parse();
gtk_text_buffer_place_cursor(buffer, iter);
compose_quote_fmt(compose, NULL, "%Q", qmark, new_text, TRUE, FALSE,
- _("Quote format error."));
+ _("Quote format error at line %d."));
quote_fmt_reset_vartable();
g_free(new_text);
g_object_set_data(G_OBJECT(compose->text), "paste_as_quotation",
if ( strcasecmp(header, prefs_common_translated_header_name("To:")) == 0 ) {
if ( newmsginfo->to == NULL ) {
newmsginfo->to = g_strdup(entry);
- } else {
+ } else if (entry && *entry) {
gchar *tmp = g_strconcat(newmsginfo->to, ", ", entry, NULL);
g_free(newmsginfo->to);
newmsginfo->to = tmp;
if ( strcasecmp(header, prefs_common_translated_header_name("Cc:")) == 0 ) {
if ( newmsginfo->cc == NULL ) {
newmsginfo->cc = g_strdup(entry);
- } else {
+ } else if (entry && *entry) {
gchar *tmp = g_strconcat(newmsginfo->cc, ", ", entry, NULL);
g_free(newmsginfo->cc);
newmsginfo->cc = tmp;
prefs_common_translated_header_name("Newsgroups:")) == 0 ) {
if ( newmsginfo->newsgroups == NULL ) {
newmsginfo->newsgroups = g_strdup(entry);
- } else {
+ } else if (entry && *entry) {
gchar *tmp = g_strconcat(newmsginfo->newsgroups, ", ", entry, NULL);
g_free(newmsginfo->newsgroups);
newmsginfo->newsgroups = tmp;