commit f282d5cb7a2d60d660f5b53b36691b539d2a2c11
parent 647fdae68321f9170653ecfc91528bfcd4b838ff
Author: Oliver Lowe <o@olowe.co>
Date: Tue, 12 Aug 2025 21:54:01 +1000
Always use "> " to quote text
I think in the old days this wasn't as universal as it now is.
Diffstat:
12 files changed, 34 insertions(+), 224 deletions(-)
diff --git a/src/account.c b/src/account.c
@@ -1035,10 +1035,8 @@ static void account_clone(GtkWidget *widget, gpointer data)
ACP_FDUP(compose_subject_format);
ACP_FDUP(compose_body_format);
ACP_FASSIGN(reply_with_format);
- ACP_FDUP(reply_quotemark);
ACP_FDUP(reply_body_format);
ACP_FASSIGN(forward_with_format);
- ACP_FDUP(forward_quotemark);
ACP_FDUP(forward_body_format);
/* privacy */
diff --git a/src/compose.c b/src/compose.c
@@ -257,7 +257,6 @@ static gchar *compose_parse_references (const gchar *ref,
static gchar *compose_quote_fmt (Compose *compose,
MsgInfo *msginfo,
const gchar *fmt,
- const gchar *qmark,
const gchar *body,
gboolean rewrap,
gboolean need_unescape,
@@ -1149,9 +1148,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
gtk_text_buffer_get_iter_at_offset(buffer, &end, -1);
tmp = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
- compose_quote_fmt(compose, dummyinfo,
- body_format,
- NULL, tmp, FALSE, TRUE,
+ compose_quote_fmt(compose, dummyinfo, body_format, tmp, FALSE, TRUE,
_("The body of the \"New message\" template has an error at line %d."));
compose_attach_from_list(compose, quote_fmt_get_attachments_list(), FALSE);
quote_fmt_reset_vartable();
@@ -1537,7 +1534,6 @@ static Compose *compose_generic_reply(MsgInfo *msginfo,
GtkTextView *textview;
GtkTextBuffer *textbuf;
gboolean quote = FALSE;
- const gchar *qmark = NULL;
const gchar *body_fmt = NULL;
gchar *s_system = NULL;
START_TIMING("");
@@ -1629,19 +1625,16 @@ static Compose *compose_generic_reply(MsgInfo *msginfo,
(quote_mode == COMPOSE_QUOTE_CHECK && prefs_common.reply_with_quote)) {
/* use the reply format of folder (if enabled), or the account's one
(if enabled) or fallback to the global reply format, which is always
- enabled (even if empty), and use the relevant quotemark */
+ enabled (even if empty). */
quote = TRUE;
if (msginfo->folder && msginfo->folder->prefs &&
msginfo->folder->prefs->reply_with_format) {
- qmark = msginfo->folder->prefs->reply_quotemark;
body_fmt = msginfo->folder->prefs->reply_body_format;
} else if (account->reply_with_format) {
- qmark = account->reply_quotemark;
body_fmt = account->reply_body_format;
} else {
- qmark = prefs_common.quotemark;
if (prefs_common.quotefmt && *prefs_common.quotefmt)
body_fmt = gettext(prefs_common.quotefmt);
else
@@ -1650,11 +1643,8 @@ static Compose *compose_generic_reply(MsgInfo *msginfo,
}
if (quote) {
- /* empty quotemark is not allowed */
- if (qmark == NULL || *qmark == '\0')
- qmark = "> ";
compose_quote_fmt(compose, compose->replyinfo,
- body_fmt, qmark, body, FALSE, TRUE,
+ body_fmt, body, FALSE, TRUE,
_("The body of the \"Reply\" template has an error at line %d."));
compose_attach_from_list(compose, quote_fmt_get_attachments_list(), FALSE);
quote_fmt_reset_vartable();
@@ -1833,7 +1823,6 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
g_free(msgfile);
} else {
- const gchar *qmark = NULL;
const gchar *body_fmt = NULL;
MsgInfo *full_msginfo;
@@ -1841,32 +1830,26 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
if (!full_msginfo)
full_msginfo = procmsg_msginfo_copy(msginfo);
- /* use the forward format of folder (if enabled), or the account's one
- (if enabled) or fallback to the global forward format, which is always
- enabled (even if empty), and use the relevant quotemark */
+ /*
+ * use the forward format of folder (if enabled), or the account's one
+ * (if enabled) or fallback to the global forward format, which is always
+ * enabled (even if empty).
+ */
if (msginfo->folder && msginfo->folder->prefs &&
msginfo->folder->prefs->forward_with_format) {
- qmark = msginfo->folder->prefs->forward_quotemark;
body_fmt = msginfo->folder->prefs->forward_body_format;
} else if (account->forward_with_format) {
- qmark = account->forward_quotemark;
body_fmt = account->forward_body_format;
-
} else {
- qmark = prefs_common.fw_quotemark;
if (prefs_common.fw_quotefmt && *prefs_common.fw_quotefmt)
body_fmt = gettext(prefs_common.fw_quotefmt);
else
body_fmt = "";
}
- /* empty quotemark is not allowed */
- if (qmark == NULL || *qmark == '\0')
- qmark = "> ";
-
compose_quote_fmt(compose, full_msginfo,
- body_fmt, qmark, body, FALSE, TRUE,
+ body_fmt, body, FALSE, TRUE,
_("The body of the \"Forward\" template has an error at line %d."));
compose_attach_from_list(compose, quote_fmt_get_attachments_list(), FALSE);
quote_fmt_reset_vartable();
@@ -2571,7 +2554,7 @@ Compose *compose_redirect(PrefsAccount *account, MsgInfo *msginfo,
msginfo->subject);
gtk_editable_set_editable(GTK_EDITABLE(compose->subject_entry), FALSE);
- compose_quote_fmt(compose, msginfo, "%M", NULL, NULL, FALSE, FALSE,
+ compose_quote_fmt(compose, msginfo, "%M", NULL, FALSE, FALSE,
_("The body of the \"Redirect\" template has an error at line %d."));
quote_fmt_reset_vartable();
gtk_text_view_set_editable(GTK_TEXT_VIEW(compose->text), FALSE);
@@ -3108,8 +3091,8 @@ static gchar *compose_parse_references(const gchar *ref, const gchar *msgid)
}
static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
- const gchar *fmt, const gchar *qmark,
- const gchar *body, gboolean rewrap,
+ const gchar *fmt, const gchar *body,
+ gboolean rewrap,
gboolean need_unescape,
const gchar *err_msg)
{
@@ -3124,7 +3107,6 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
GtkTextIter iter;
GtkTextMark *mark;
-
SIGNAL_BLOCK(buffer);
if (!msginfo) {
@@ -3132,26 +3114,23 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
msginfo = dummyinfo;
}
- if (qmark != NULL) {
+ const char *qmark = "> ";
#ifdef USE_ENCHANT
- quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE,
- compose->gtkaspell);
+ quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE,
+ compose->gtkaspell);
#else
- quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE);
+ quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE);
#endif
- quote_fmt_scan_string(qmark);
- quote_fmt_parse();
+ quote_fmt_scan_string(qmark);
+ quote_fmt_parse();
- buf = quote_fmt_get_buffer();
-
- if (buf == NULL)
- alertpanel_error(_("The \"Quotation mark\" of the template is invalid."));
- else
- Xstrdup_a(quote_str, buf, goto error)
- }
+ buf = quote_fmt_get_buffer();
+ if (buf == NULL)
+ alertpanel_error(_("The \"Quotation mark\" of the template is invalid."));
+ else
+ Xstrdup_a(quote_str, buf, goto error)
if (fmt && *fmt != '\0') {
-
if (trimmed_body)
while (*trimmed_body == '\n')
trimmed_body++;
@@ -8776,44 +8755,6 @@ void compose_reflect_prefs_pixmap_theme(void)
}
}
-static const gchar *compose_quote_char_from_context(Compose *compose)
-{
- const gchar *qmark = NULL;
-
- cm_return_val_if_fail(compose != NULL, NULL);
-
- switch (compose->mode) {
- /* use forward-specific quote char */
- case COMPOSE_FORWARD:
- case COMPOSE_FORWARD_AS_ATTACH:
- case COMPOSE_FORWARD_INLINE:
- if (compose->folder && compose->folder->prefs &&
- compose->folder->prefs->forward_with_format)
- qmark = compose->folder->prefs->forward_quotemark;
- else if (compose->account->forward_with_format)
- qmark = compose->account->forward_quotemark;
- else
- qmark = prefs_common.fw_quotemark;
- break;
-
- /* use reply-specific quote char in all other modes */
- default:
- if (compose->folder && compose->folder->prefs &&
- compose->folder->prefs->reply_with_format)
- qmark = compose->folder->prefs->reply_quotemark;
- else if (compose->account->reply_with_format)
- qmark = compose->account->reply_quotemark;
- else
- qmark = prefs_common.quotemark;
- break;
- }
-
- if (qmark == NULL || *qmark == '\0')
- qmark = "> ";
-
- return qmark;
-}
-
static void compose_template_apply(Compose *compose, Template *tmpl,
gboolean replace)
{
@@ -8821,7 +8762,6 @@ static void compose_template_apply(Compose *compose, Template *tmpl,
GtkTextBuffer *buffer;
GtkTextMark *mark;
GtkTextIter iter;
- const gchar *qmark;
gchar *parsed_str = NULL;
gint cursor_pos = 0;
const gchar *err_msg = _("The body of the template has an error at line %d.");
@@ -8833,17 +8773,14 @@ static void compose_template_apply(Compose *compose, Template *tmpl,
buffer = gtk_text_view_get_buffer(text);
if (tmpl->value) {
- qmark = compose_quote_char_from_context(compose);
-
if (compose->replyinfo != NULL) {
-
if (replace)
gtk_text_buffer_set_text(buffer, "", -1);
mark = gtk_text_buffer_get_insert(buffer);
gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
parsed_str = compose_quote_fmt(compose, compose->replyinfo,
- tmpl->value, qmark, NULL, FALSE, FALSE, err_msg);
+ tmpl->value, NULL, FALSE, FALSE, err_msg);
} else if (compose->fwdinfo != NULL) {
@@ -8853,7 +8790,7 @@ static void compose_template_apply(Compose *compose, Template *tmpl,
gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
parsed_str = compose_quote_fmt(compose, compose->fwdinfo,
- tmpl->value, qmark, NULL, FALSE, FALSE, err_msg);
+ tmpl->value, NULL, FALSE, FALSE, err_msg);
} else {
MsgInfo* dummyinfo = compose_msginfo_new_from_compose(compose);
@@ -8870,7 +8807,7 @@ static void compose_template_apply(Compose *compose, Template *tmpl,
gtk_text_buffer_set_text(buffer, "", -1);
parsed_str = compose_quote_fmt(compose, dummyinfo,
- tmpl->value, qmark, tmp, FALSE, FALSE, err_msg);
+ tmpl->value, tmp, FALSE, FALSE, err_msg);
procmsg_msginfo_free( &dummyinfo );
g_free( tmp );
@@ -11927,7 +11864,6 @@ static void text_inserted(GtkTextBuffer *buffer, GtkTextIter *iter,
compose);
if (paste_as_quotation) {
gchar *new_text;
- const gchar *qmark;
guint pos = 0;
GtkTextIter start_iter;
@@ -11936,14 +11872,12 @@ static void text_inserted(GtkTextBuffer *buffer, GtkTextIter *iter,
new_text = g_strndup(text, len);
- qmark = compose_quote_char_from_context(compose);
-
mark = gtk_text_buffer_create_mark(buffer, NULL, iter, FALSE);
gtk_text_buffer_place_cursor(buffer, iter);
pos = gtk_text_iter_get_offset(iter);
- compose_quote_fmt(compose, NULL, "%Q", qmark, new_text, TRUE, FALSE,
+ compose_quote_fmt(compose, NULL, "%Q", new_text, TRUE, FALSE,
_("Quote format error at line %d."));
quote_fmt_reset_vartable();
g_free(new_text);
diff --git a/src/folder_item_prefs.c b/src/folder_item_prefs.c
@@ -123,16 +123,12 @@ static PrefParam param[] = {
NULL, NULL, NULL},
{"reply_override_from_format", NULL, &tmp_prefs.reply_override_from_format, P_STRING,
NULL, NULL, NULL},
- {"reply_quotemark", NULL, &tmp_prefs.reply_quotemark, P_STRING,
- NULL, NULL, NULL},
{"reply_body_format", NULL, &tmp_prefs.reply_body_format, P_STRING,
NULL, NULL, NULL},
{"forward_with_format", "FALSE", &tmp_prefs.forward_with_format, P_BOOL,
NULL, NULL, NULL},
{"forward_override_from_format", NULL, &tmp_prefs.forward_override_from_format, P_STRING,
NULL, NULL, NULL},
- {"forward_quotemark", NULL, &tmp_prefs.forward_quotemark, P_STRING,
- NULL, NULL, NULL},
{"forward_body_format", NULL, &tmp_prefs.forward_body_format, P_STRING,
NULL, NULL, NULL},
{"config_version", "-1", &tmp_prefs.config_version, P_INT,
@@ -245,11 +241,9 @@ static FolderItemPrefs *folder_item_prefs_clear(FolderItemPrefs *prefs)
prefs->compose_body_format = NULL;
prefs->compose_override_from_format = NULL;
prefs->reply_with_format = FALSE;
- prefs->reply_quotemark = NULL;
prefs->reply_body_format = NULL;
prefs->reply_override_from_format = NULL;
prefs->forward_with_format = FALSE;
- prefs->forward_quotemark = NULL;
prefs->forward_body_format = NULL;
prefs->forward_override_from_format = NULL;
return prefs;
@@ -275,10 +269,8 @@ void folder_item_prefs_free(FolderItemPrefs * prefs)
g_free(prefs->compose_subject_format);
g_free(prefs->compose_body_format);
g_free(prefs->compose_override_from_format);
- g_free(prefs->reply_quotemark);
g_free(prefs->reply_body_format);
g_free(prefs->reply_override_from_format);
- g_free(prefs->forward_quotemark);
g_free(prefs->forward_body_format);
g_free(prefs->forward_override_from_format);
g_free(prefs);
@@ -350,11 +342,9 @@ void folder_item_prefs_copy_prefs(FolderItem * src, FolderItem * dest)
tmp_prefs.compose_body_format = g_strdup(src->prefs->compose_body_format);
tmp_prefs.compose_override_from_format = g_strdup(src->prefs->compose_override_from_format);
tmp_prefs.reply_with_format = src->prefs->reply_with_format;
- tmp_prefs.reply_quotemark = g_strdup(src->prefs->reply_quotemark);
tmp_prefs.reply_body_format = g_strdup(src->prefs->reply_body_format);
tmp_prefs.reply_override_from_format = g_strdup(src->prefs->reply_override_from_format);
tmp_prefs.forward_with_format = src->prefs->forward_with_format;
- tmp_prefs.forward_quotemark = g_strdup(src->prefs->forward_quotemark);
tmp_prefs.forward_body_format = g_strdup(src->prefs->forward_body_format);
tmp_prefs.forward_override_from_format = g_strdup(src->prefs->forward_override_from_format);
diff --git a/src/folder_item_prefs.h b/src/folder_item_prefs.h
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
*/
#ifndef FOLDER_ITEM_PREFS_H
@@ -99,11 +99,9 @@ struct _FolderItemPrefs {
gchar *compose_subject_format;
gchar *compose_body_format;
gboolean reply_with_format;
- gchar *reply_quotemark;
gchar *reply_override_from_format;
gchar *reply_body_format;
gboolean forward_with_format;
- gchar *forward_quotemark;
gchar *forward_override_from_format;
gchar *forward_body_format;
};
diff --git a/src/prefs_account.c b/src/prefs_account.c
@@ -276,10 +276,8 @@ typedef struct TemplatesPage
GtkWidget *compose_subject_format;
GtkWidget *compose_body_format;
GtkWidget *checkbtn_reply_with_format;
- GtkWidget *reply_quotemark;
GtkWidget *reply_body_format;
GtkWidget *checkbtn_forward_with_format;
- GtkWidget *forward_quotemark;
GtkWidget *forward_body_format;
} TemplatesPage;
@@ -800,10 +798,6 @@ static PrefParam templates_param[] = {
&templates_page.checkbtn_reply_with_format,
prefs_set_data_from_toggle, prefs_set_toggle},
- {"reply_quotemark", NULL, &tmp_ac_prefs.reply_quotemark, P_STRING,
- &templates_page.reply_quotemark,
- prefs_set_data_from_entry, prefs_set_entry_from_escaped},
-
{"reply_body_format", NULL, &tmp_ac_prefs.reply_body_format, P_STRING,
&templates_page.reply_body_format,
prefs_set_escaped_data_from_text, prefs_set_text_from_escaped},
@@ -812,10 +806,6 @@ static PrefParam templates_param[] = {
&templates_page.checkbtn_forward_with_format,
prefs_set_data_from_toggle, prefs_set_toggle},
- {"forward_quotemark", NULL, &tmp_ac_prefs.forward_quotemark, P_STRING,
- &templates_page.forward_quotemark,
- prefs_set_data_from_entry, prefs_set_entry_from_escaped},
-
{"forward_body_format", NULL, &tmp_ac_prefs.forward_body_format, P_STRING,
&templates_page.forward_body_format,
prefs_set_escaped_data_from_text, prefs_set_text_from_escaped},
@@ -2698,7 +2688,6 @@ static void templates_create_widget_func(PrefsPage * _page,
vbox2,
&page->checkbtn_reply_with_format,
NULL,
- &page->reply_quotemark,
&page->reply_body_format,
TRUE, NULL);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(C_("Templates", "Reply")));
@@ -2713,7 +2702,6 @@ static void templates_create_widget_func(PrefsPage * _page,
vbox2,
&page->checkbtn_forward_with_format,
NULL,
- &page->forward_quotemark,
&page->forward_body_format,
TRUE, NULL);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(C_("Templates", "Forward")));
@@ -4058,11 +4046,9 @@ static void templates_save_func(PrefsPage *_page)
tmp_ac_prefs.compose_body_format);
quotefmt_check_reply_formats(tmp_ac_prefs.reply_with_format,
NULL,
- tmp_ac_prefs.reply_quotemark,
tmp_ac_prefs.reply_body_format);
quotefmt_check_forward_formats(tmp_ac_prefs.forward_with_format,
NULL,
- tmp_ac_prefs.forward_quotemark,
tmp_ac_prefs.forward_body_format);
if (prefs_templates_apply() >= 0)
cancelled = FALSE;
diff --git a/src/prefs_account.h b/src/prefs_account.h
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ *
*/
#ifndef PREFS_ACCOUNT_H
@@ -85,7 +85,7 @@ struct _PrefsAccount
SSLType ssl_imap;
SSLType ssl_nntp;
SSLType ssl_smtp;
-
+
gchar *out_ssl_client_cert_file;
gchar *out_ssl_client_cert_pass;
gchar *in_ssl_client_cert_file;
@@ -163,10 +163,8 @@ struct _PrefsAccount
gchar *compose_subject_format;
gchar *compose_body_format;
gboolean reply_with_format;
- gchar *reply_quotemark;
gchar *reply_body_format;
gboolean forward_with_format;
- gchar *forward_quotemark;
gchar *forward_body_format;
/* Privacy */
diff --git a/src/prefs_common.c b/src/prefs_common.c
@@ -303,14 +303,9 @@ static PrefParam param[] = {
{"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
NULL, NULL, NULL},
- /* Quote */
- {"reply_quote_mark", "> ", &prefs_common.quotemark, P_STRING,
- NULL, NULL, NULL},
{"reply_quote_format", N_("On %d\\n%f wrote:\\n\\n%q\\n%X"),
&prefs_common.quotefmt, P_STRING, NULL, NULL, NULL},
- {"forward_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
- NULL, NULL, NULL},
{"forward_quote_format",
N_("\\n\\nBegin forwarded message:\\n\\n"
"?d{Date: %d\\n}?f{From: %f\\n}?t{To: %t\\n}?c{Cc: %c\\n}"
diff --git a/src/prefs_common.h b/src/prefs_common.h
@@ -210,9 +210,7 @@ struct _PrefsCommon
/* Quote */
gboolean reply_with_quote;
- gchar *quotemark;
gchar *quotefmt;
- gchar *fw_quotemark;
gchar *fw_quotefmt;
gboolean forward_as_attachment;
gboolean redirect_keep_from;
diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c
@@ -175,11 +175,9 @@ struct _FolderItemTemplatesPage
GtkWidget *compose_subject_format;
GtkWidget *compose_body_format;
GtkWidget *checkbtn_reply_with_format;
- GtkWidget *reply_quotemark;
GtkWidget *reply_override_from_format;
GtkWidget *reply_body_format;
GtkWidget *checkbtn_forward_with_format;
- GtkWidget *forward_quotemark;
GtkWidget *forward_override_from_format;
GtkWidget *forward_body_format;
@@ -1684,7 +1682,6 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
vbox,
&page->checkbtn_reply_with_format,
&page->reply_override_from_format,
- &page->reply_quotemark,
&page->reply_body_format,
FALSE, FALSE);
address_completion_register_entry(GTK_ENTRY(page->reply_override_from_format),
@@ -1712,7 +1709,6 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
vbox,
&page->checkbtn_forward_with_format,
&page->forward_override_from_format,
- &page->forward_quotemark,
&page->forward_body_format,
FALSE, FALSE);
address_completion_register_entry(GTK_ENTRY(page->forward_override_from_format),
@@ -1741,8 +1737,6 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(page->checkbtn_reply_with_format),
item->prefs->reply_with_format);
- pref_set_entry_from_pref(GTK_ENTRY(page->reply_quotemark),
- item->prefs->reply_quotemark);
pref_set_entry_from_pref(GTK_ENTRY(page->reply_override_from_format),
item->prefs->reply_override_from_format);
pref_set_textview_from_pref(GTK_TEXT_VIEW(page->reply_body_format),
@@ -1750,8 +1744,6 @@ static void prefs_folder_item_templates_create_widget_func(PrefsPage * page_,
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(page->checkbtn_forward_with_format),
item->prefs->forward_with_format);
- pref_set_entry_from_pref(GTK_ENTRY(page->forward_quotemark),
- item->prefs->forward_quotemark);
pref_set_entry_from_pref(GTK_ENTRY(page->forward_override_from_format),
item->prefs->forward_override_from_format);
pref_set_textview_from_pref(GTK_TEXT_VIEW(page->forward_body_format),
@@ -1819,30 +1811,24 @@ static void templates_save_folder_prefs(FolderItem *folder, FolderItemTemplatesP
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->reply_format_rec_checkbtn))) {
prefs->reply_with_format =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_reply_with_format));
- prefs->reply_quotemark = gtk_editable_get_chars(
- GTK_EDITABLE(page->reply_quotemark), 0, -1);
prefs->reply_override_from_format = pref_get_pref_from_entry(
GTK_ENTRY(page->reply_override_from_format));
prefs->reply_body_format = pref_get_pref_from_textview(
GTK_TEXT_VIEW(page->reply_body_format));
quotefmt_check_reply_formats(prefs->reply_with_format,
prefs->reply_override_from_format,
- prefs->reply_quotemark,
prefs->reply_body_format);
}
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->forward_format_rec_checkbtn))) {
prefs->forward_with_format =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_forward_with_format));
- prefs->forward_quotemark = gtk_editable_get_chars(
- GTK_EDITABLE(page->forward_quotemark), 0, -1);
prefs->forward_override_from_format = pref_get_pref_from_entry(
GTK_ENTRY(page->forward_override_from_format));
prefs->forward_body_format = pref_get_pref_from_textview(
GTK_TEXT_VIEW(page->forward_body_format));
quotefmt_check_forward_formats(prefs->forward_with_format,
prefs->forward_override_from_format,
- prefs->forward_quotemark,
prefs->forward_body_format);
}
diff --git a/src/prefs_quote.c b/src/prefs_quote.c
@@ -52,9 +52,7 @@ typedef struct _QuotePage
GtkWidget *checkbtn_compose_with_format;
GtkWidget *entry_subject;
GtkWidget *text_format;
- GtkWidget *entry_quotemark;
GtkWidget *text_quotefmt;
- GtkWidget *entry_fw_quotemark;
GtkWidget *text_fw_quotefmt;
GtkWidget *btn_quotedesc;
} QuotePage;
@@ -128,7 +126,6 @@ static void prefs_quote_create_widget(PrefsPage *_page, GtkWindow *window,
vbox2,
NULL,
NULL,
- &prefs_quote->entry_quotemark,
&prefs_quote->text_quotefmt,
TRUE, prefs_quote_set_default_reply_fmt);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(C_("Templates", "Reply")));
@@ -143,7 +140,6 @@ static void prefs_quote_create_widget(PrefsPage *_page, GtkWindow *window,
vbox2,
NULL,
NULL,
- &prefs_quote->entry_fw_quotemark,
&prefs_quote->text_fw_quotefmt,
TRUE, prefs_quote_set_default_forward_fmt);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox2, gtk_label_new(C_("Templates", "Forward")));
@@ -158,16 +154,12 @@ static void prefs_quote_create_widget(PrefsPage *_page, GtkWindow *window,
else
prefs_quote_set_default_new_msg_fmt();
- gtk_entry_set_text(GTK_ENTRY(prefs_quote->entry_quotemark),
- prefs_common.quotemark?prefs_common.quotemark:"");
if (prefs_common.quotefmt)
pref_set_textview_from_pref(GTK_TEXT_VIEW(prefs_quote->text_quotefmt),
prefs_common.quotefmt);
else
prefs_quote_set_default_reply_fmt();
- gtk_entry_set_text(GTK_ENTRY(prefs_quote->entry_fw_quotemark),
- prefs_common.fw_quotemark?prefs_common.fw_quotemark:"");
if (prefs_common.fw_quotefmt)
pref_set_textview_from_pref(GTK_TEXT_VIEW(prefs_quote->text_fw_quotefmt),
prefs_common.fw_quotefmt);
@@ -190,10 +182,6 @@ static void prefs_quote_save(PrefsPage *_page)
prefs_common.quotefmt = NULL;
g_free(prefs_common.fw_quotefmt);
prefs_common.fw_quotefmt = NULL;
- g_free(prefs_common.quotemark);
- prefs_common.quotemark = NULL;
- g_free(prefs_common.fw_quotemark);
- prefs_common.fw_quotemark = NULL;
prefs_common.compose_with_format =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_compose_with_format));
@@ -206,23 +194,13 @@ static void prefs_quote_save(PrefsPage *_page)
prefs_common.compose_subject_format,
prefs_common.compose_body_format);
- prefs_common.quotemark = gtk_editable_get_chars(
- GTK_EDITABLE(page->entry_quotemark), 0, -1);
prefs_common.quotefmt = pref_get_pref_from_textview(
GTK_TEXT_VIEW(page->text_quotefmt));
- quotefmt_check_reply_formats(TRUE,
- NULL,
- prefs_common.quotemark,
- prefs_common.quotefmt);
+ quotefmt_check_reply_formats(TRUE, NULL, prefs_common.quotefmt);
- prefs_common.fw_quotemark = gtk_editable_get_chars(
- GTK_EDITABLE(page->entry_fw_quotemark), 0, -1);
prefs_common.fw_quotefmt = pref_get_pref_from_textview(
GTK_TEXT_VIEW(page->text_fw_quotefmt));
- quotefmt_check_forward_formats(TRUE,
- NULL,
- prefs_common.fw_quotemark,
- prefs_common.fw_quotefmt);
+ quotefmt_check_forward_formats(TRUE, NULL, prefs_common.fw_quotefmt);
}
static void prefs_quote_destroy_widget(PrefsPage *_page)
diff --git a/src/quote_fmt.c b/src/quote_fmt.c
@@ -263,7 +263,6 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
GtkWidget *parent_box,
GtkWidget **checkbtn_reply_with_format,
GtkWidget **override_from_format,
- GtkWidget **edit_reply_quotemark,
GtkWidget **edit_reply_format,
gboolean add_info_button,
void(*set_defaults_func)(void))
@@ -273,8 +272,6 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
GtkWidget *hbox1;
GtkWidget *hbox2;
GtkWidget *hbox3;
- GtkWidget *label_quotemark;
- GtkWidget *entry_quotemark;
GtkWidget *label_from = NULL;
GtkWidget *entry_from = NULL;
GtkWidget *scrolledwin_quotefmt;
@@ -287,7 +284,6 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
if (checkbtn_reply_with_format)
cm_return_if_fail(checkbtn_reply_with_format != NULL);
- cm_return_if_fail(edit_reply_quotemark != NULL);
cm_return_if_fail(edit_reply_format != NULL);
size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
@@ -328,17 +324,6 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
- label_quotemark = gtk_label_new (_("Quotation mark"));
- gtk_label_set_xalign(GTK_LABEL(label_quotemark), 1.0);
- gtk_widget_show (label_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox2), label_quotemark, FALSE, FALSE, 0);
- gtk_size_group_add_widget(size_group, label_quotemark);
-
- entry_quotemark = gtk_entry_new ();
- gtk_widget_show (entry_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox2), entry_quotemark, FALSE, FALSE, 0);
- gtk_widget_set_size_request (entry_quotemark, 64, -1);
-
scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwin_quotefmt);
gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt,
@@ -366,8 +351,6 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_quotefmt), TRUE);
if (checkbtn_reply_with_format) {
- SET_TOGGLE_SENSITIVITY(checkbtn_use_format, label_quotemark);
- SET_TOGGLE_SENSITIVITY(checkbtn_use_format, entry_quotemark);
if (override_from_format) {
SET_TOGGLE_SENSITIVITY(checkbtn_use_format, entry_from);
SET_TOGGLE_SENSITIVITY(checkbtn_use_format, label_from);
@@ -380,7 +363,6 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
if (checkbtn_reply_with_format)
*checkbtn_reply_with_format = checkbtn_use_format;
- *edit_reply_quotemark = entry_quotemark;
if (override_from_format)
*override_from_format = entry_from;
*edit_reply_format = text_quotefmt;
@@ -392,7 +374,6 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
GtkWidget *parent_box,
GtkWidget **checkbtn_forward_with_format,
GtkWidget **override_from_format,
- GtkWidget **edit_fw_quotemark,
GtkWidget **edit_fw_format,
gboolean add_info_button,
void(*set_defaults_func)(void))
@@ -402,8 +383,6 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
GtkWidget *hbox1;
GtkWidget *hbox2;
GtkWidget *hbox3;
- GtkWidget *label_quotemark;
- GtkWidget *entry_fw_quotemark;
GtkWidget *label_from = NULL;
GtkWidget *entry_from = NULL;
GtkWidget *scrolledwin_quotefmt;
@@ -416,7 +395,6 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
if (checkbtn_forward_with_format) {
cm_return_if_fail(checkbtn_forward_with_format != NULL);
}
- cm_return_if_fail(edit_fw_quotemark != NULL);
cm_return_if_fail(edit_fw_format != NULL);
size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
@@ -457,18 +435,6 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
- label_quotemark = gtk_label_new (_("Quotation mark"));
- gtk_label_set_xalign(GTK_LABEL(label_quotemark), 1.0);
- gtk_widget_show (label_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox2), label_quotemark, FALSE, FALSE, 0);
- gtk_size_group_add_widget(size_group, label_quotemark);
-
- entry_fw_quotemark = gtk_entry_new ();
- gtk_widget_show (entry_fw_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox2), entry_fw_quotemark,
- FALSE, FALSE, 0);
- gtk_widget_set_size_request (entry_fw_quotemark, 64, -1);
-
scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwin_quotefmt);
gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt,
@@ -497,8 +463,6 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_fw_quotefmt), TRUE);
if (checkbtn_forward_with_format) {
- SET_TOGGLE_SENSITIVITY(checkbtn_use_format, label_quotemark);
- SET_TOGGLE_SENSITIVITY(checkbtn_use_format, entry_fw_quotemark);
if (override_from_format) {
SET_TOGGLE_SENSITIVITY(checkbtn_use_format, entry_from);
SET_TOGGLE_SENSITIVITY(checkbtn_use_format, label_from);
@@ -511,7 +475,6 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
if (checkbtn_forward_with_format)
*checkbtn_forward_with_format = checkbtn_use_format;
- *edit_fw_quotemark = entry_fw_quotemark;
if (override_from_format)
*override_from_format = entry_from;
*edit_fw_format = text_fw_quotefmt;
@@ -569,15 +532,10 @@ void quotefmt_check_new_msg_formats(gboolean use_format,
void quotefmt_check_reply_formats(gboolean use_format,
gchar *override_from_fmt,
- gchar *quotation_mark,
gchar *body_fmt)
{
if (use_format) {
- gint line;
-
- if (!prefs_template_string_is_valid(quotation_mark, NULL, TRUE, FALSE))
- alertpanel_error(_("The \"Quotation mark\" field of the \"Reply\" template is invalid."));
-
+ int line;
if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, TRUE, TRUE))
alertpanel_error(_("The \"From\" field of the \"Reply\" template contains an invalid email address."));
@@ -589,15 +547,10 @@ void quotefmt_check_reply_formats(gboolean use_format,
void quotefmt_check_forward_formats(gboolean use_format,
gchar *override_from_fmt,
- gchar *quotation_mark,
gchar *body_fmt)
{
if (use_format) {
- gint line;
-
- if (!prefs_template_string_is_valid(quotation_mark, NULL, TRUE, FALSE))
- alertpanel_error(_("The \"Quotation mark\" field of the \"Forward\" template is invalid."));
-
+ int line;
if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, TRUE, TRUE))
alertpanel_error(_("The \"From\" field of the \"Forward\" template contains an invalid email address."));
diff --git a/src/quote_fmt.h b/src/quote_fmt.h
@@ -62,7 +62,6 @@ void quotefmt_create_reply_fmt_widgets(GtkWindow *parent_window,
GtkWidget *parent_box,
GtkWidget **checkbtn_reply_with_format,
GtkWidget **override_from_format,
- GtkWidget **edit_reply_quotemark,
GtkWidget **edit_reply_format,
gboolean add_info_button,
void(*set_defaults_func)(void));
@@ -70,7 +69,6 @@ void quotefmt_create_forward_fmt_widgets(GtkWindow *parent_window,
GtkWidget *parent_box,
GtkWidget **checkbtn_forward_with_format,
GtkWidget **override_from_format,
- GtkWidget **edit_fw_quotemark,
GtkWidget **edit_fw_format,
gboolean add_info_button,
void(*set_defaults_func)(void));
@@ -85,11 +83,9 @@ void quotefmt_check_new_msg_formats(gboolean use_format,
gchar *body_fmt);
void quotefmt_check_reply_formats(gboolean use_format,
gchar *override_from_fmt,
- gchar *quotation_mark,
gchar *body_fmt);
void quotefmt_check_forward_formats(gboolean use_format,
gchar *override_from_fmt,
- gchar *quotation_mark,
gchar *body_fmt);
#endif /* __QUOTE_FMT_H__ */