tmpl->load_filename = g_strdup(filename);;
tmpl->name = NULL;
tmpl->subject = NULL;
- tmpl->from = NULL;
tmpl->to = NULL;
tmpl->cc = NULL;
tmpl->bcc = NULL;
break;
else if (!g_ascii_strncasecmp(buf, "Name:", 5))
tmpl->name = g_strdup(g_strstrip(buf + 5));
- else if (!g_ascii_strncasecmp(buf, "From:", 5))
- tmpl->from = g_strdup(g_strstrip(buf + 5));
else if (!g_ascii_strncasecmp(buf, "To:", 3))
tmpl->to = g_strdup(g_strstrip(buf + 3));
else if (!g_ascii_strncasecmp(buf, "Cc:", 3))
TRY(fprintf(fp, "Name: %s\n", tmpl->name) > 0);
if (tmpl->subject && *tmpl->subject != '\0')
TRY(fprintf(fp, "Subject: %s\n", tmpl->subject) > 0);
- if (tmpl->from && *tmpl->from != '\0')
- TRY(fprintf(fp, "From: %s\n", tmpl->from) > 0);
if (tmpl->to && *tmpl->to != '\0')
TRY(fprintf(fp, "To: %s\n", tmpl->to) > 0);
if (tmpl->cc && *tmpl->cc != '\0')
gchar *load_filename;
gchar *name;
gchar *subject;
- gchar *from;
gchar *to;
gchar *cc;
gchar *bcc;
const gchar *body_format = NULL;
gchar *mailto_from = NULL;
PrefsAccount *mailto_account = NULL;
- MsgInfo* dummyinfo = NULL;
/* check if mailto defines a from */
if (mailto && *mailto != '\0') {
if (mailto_from) {
gtk_entry_set_text(GTK_ENTRY(compose->from_name), mailto_from);
g_free(mailto_from);
- } else
- /* override from name according to folder properties */
- if (item && item->prefs &&
- item->prefs->compose_with_format &&
- item->prefs->compose_override_from_format &&
- *item->prefs->compose_override_from_format != '\0') {
-
- gchar *tmp = NULL;
- gchar *buf = NULL;
-
- dummyinfo = compose_msginfo_new_from_compose(compose);
-
- /* decode \-escape sequences in the internal representation of the quote format */
- tmp = malloc(strlen(item->prefs->compose_override_from_format)+1);
- pref_get_unescaped_pref(tmp, item->prefs->compose_override_from_format);
-
-#ifdef USE_ASPELL
- quote_fmt_init(dummyinfo, NULL, NULL, FALSE, compose->account, FALSE,
- compose->gtkaspell);
-#else
- quote_fmt_init(dummyinfo, NULL, NULL, FALSE, compose->account, FALSE);
-#endif
- quote_fmt_scan_string(tmp);
- quote_fmt_parse();
-
- buf = quote_fmt_get_buffer();
- if (buf == NULL)
- alertpanel_error(_("New message From format error."));
- else
- gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
- quote_fmt_reset_vartable();
-
- g_free(tmp);
- }
+ }
ifactory = gtk_item_factory_from_widget(compose->menubar);
}
if (subject_format || body_format) {
+ MsgInfo* dummyinfo = NULL;
if ( subject_format
&& *subject_format != '\0' )
gchar *tmp = NULL;
gchar *buf = NULL;
- if (!dummyinfo)
- dummyinfo = compose_msginfo_new_from_compose(compose);
+ dummyinfo = compose_msginfo_new_from_compose(compose);
/* decode \-escape sequences in the internal representation of the quote format */
tmp = malloc(strlen(subject_format)+1);
GtkTextIter start, end;
gchar *tmp = NULL;
- if (!dummyinfo)
+ if ( dummyinfo == NULL )
dummyinfo = compose_msginfo_new_from_compose(compose);
text = GTK_TEXT_VIEW(compose->text);
g_free(tmp);
}
+ procmsg_msginfo_free( dummyinfo );
}
- procmsg_msginfo_free( dummyinfo );
if (attach_files) {
gint i;
return NULL;
}
- /* override from name according to folder properties */
- if (msginfo->folder && msginfo->folder->prefs &&
- msginfo->folder->prefs->reply_with_format &&
- msginfo->folder->prefs->reply_override_from_format &&
- *msginfo->folder->prefs->reply_override_from_format != '\0') {
-
- gchar *tmp = NULL;
- gchar *buf = NULL;
-
- /* decode \-escape sequences in the internal representation of the quote format */
- tmp = malloc(strlen(msginfo->folder->prefs->reply_override_from_format)+1);
- pref_get_unescaped_pref(tmp, msginfo->folder->prefs->reply_override_from_format);
-
-#ifdef USE_ASPELL
- quote_fmt_init(compose->replyinfo, NULL, NULL, FALSE, compose->account, FALSE,
- compose->gtkaspell);
-#else
- quote_fmt_init(compose->replyinfo, NULL, NULL, FALSE, compose->account, FALSE);
-#endif
- quote_fmt_scan_string(tmp);
- quote_fmt_parse();
-
- buf = quote_fmt_get_buffer();
- if (buf == NULL)
- alertpanel_error(_("Message reply From format error."));
- else
- gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
- quote_fmt_reset_vartable();
-
- g_free(tmp);
- }
-
textview = (GTK_TEXT_VIEW(compose->text));
textbuf = gtk_text_view_get_buffer(textview);
compose_create_tags(textview, compose);
g_free(buf2);
}
- /* override from name according to folder properties */
- if (msginfo->folder && msginfo->folder->prefs &&
- msginfo->folder->prefs->forward_with_format &&
- msginfo->folder->prefs->forward_override_from_format &&
- *msginfo->folder->prefs->forward_override_from_format != '\0') {
-
- gchar *tmp = NULL;
- gchar *buf = NULL;
- MsgInfo *full_msginfo = NULL;
-
- if (!as_attach)
- full_msginfo = procmsg_msginfo_get_full_info(msginfo);
- if (!full_msginfo)
- full_msginfo = procmsg_msginfo_copy(msginfo);
-
- /* decode \-escape sequences in the internal representation of the quote format */
- tmp = malloc(strlen(msginfo->folder->prefs->forward_override_from_format)+1);
- pref_get_unescaped_pref(tmp, msginfo->folder->prefs->forward_override_from_format);
-
-#ifdef USE_ASPELL
- quote_fmt_init(full_msginfo, NULL, NULL, FALSE, compose->account, FALSE,
- compose->gtkaspell);
-#else
- quote_fmt_init(full_msginfo, NULL, NULL, FALSE, compose->account, FALSE);
-#endif
- quote_fmt_scan_string(tmp);
- quote_fmt_parse();
-
- buf = quote_fmt_get_buffer();
- if (buf == NULL)
- alertpanel_error(_("Message forward From format error."));
- else
- gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
- quote_fmt_reset_vartable();
-
- g_free(tmp);
- procmsg_msginfo_free(full_msginfo);
- }
-
textview = GTK_TEXT_VIEW(compose->text);
textbuf = gtk_text_view_get_buffer(textview);
compose_create_tags(textview, compose);
compose->updating = TRUE;
- /* override from name according to folder properties */
- if (msginfo_list->data) {
- MsgInfo *msginfo = msginfo_list->data;
-
- if (msginfo->folder && msginfo->folder->prefs &&
- msginfo->folder->prefs->forward_with_format &&
- msginfo->folder->prefs->forward_override_from_format &&
- *msginfo->folder->prefs->forward_override_from_format != '\0') {
-
- gchar *tmp = NULL;
- gchar *buf = NULL;
-
- /* decode \-escape sequences in the internal representation of the quote format */
- tmp = malloc(strlen(msginfo->folder->prefs->forward_override_from_format)+1);
- pref_get_unescaped_pref(tmp, msginfo->folder->prefs->forward_override_from_format);
-
-#ifdef USE_ASPELL
- quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE,
- compose->gtkaspell);
-#else
- quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE);
-#endif
- quote_fmt_scan_string(tmp);
- quote_fmt_parse();
-
- buf = quote_fmt_get_buffer();
- if (buf == NULL)
- alertpanel_error(_("Message forward From format error."));
- else
- gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
- quote_fmt_reset_vartable();
-
- g_free(tmp);
- }
- }
-
textview = GTK_TEXT_VIEW(compose->text);
textbuf = gtk_text_view_get_buffer(textview);
compose_create_tags(textview, compose);
msginfo = dummyinfo;
}
- if (tmpl->from && *tmpl->from != '\0') {
-#ifdef USE_ASPELL
- quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE,
- compose->gtkaspell);
-#else
- quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE);
-#endif
- quote_fmt_scan_string(tmpl->from);
- quote_fmt_parse();
-
- buf = quote_fmt_get_buffer();
- if (buf == NULL) {
- alertpanel_error(_("Template From format error."));
- } else {
- gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
- }
- }
-
if (tmpl->to && *tmpl->to != '\0') {
#ifdef USE_ASPELL
quote_fmt_init(msginfo, NULL, NULL, FALSE, compose->account, FALSE,
{"compose_with_format", "FALSE", &tmp_prefs.compose_with_format, P_BOOL,
NULL, NULL, NULL},
- {"compose_override_from_format", NULL, &tmp_prefs.compose_override_from_format, P_STRING,
- NULL, NULL, NULL},
{"compose_subject_format", NULL, &tmp_prefs.compose_subject_format, P_STRING,
NULL, NULL, NULL},
{"compose_body_format", NULL, &tmp_prefs.compose_body_format, P_STRING,
NULL, NULL, NULL},
{"reply_with_format", "FALSE", &tmp_prefs.reply_with_format, P_BOOL,
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,
guint color;
gboolean compose_with_format;
- gchar *compose_override_from_format;
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;
};
window,
vbox2,
&page->checkbtn_compose_with_format,
- NULL,
&page->compose_subject_format,
&page->compose_body_format,
FALSE);
window,
vbox2,
&page->checkbtn_reply_with_format,
- NULL,
&page->reply_quotemark,
&page->reply_body_format,
FALSE);
window,
vbox2,
&page->checkbtn_forward_with_format,
- NULL,
&page->forward_quotemark,
&page->forward_body_format,
FALSE);
return;
quotefmt_check_new_msg_formats(tmp_ac_prefs.compose_with_format,
- NULL,
tmp_ac_prefs.compose_subject_format,
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)
GtkWidget *window;
GtkWidget *table;
GtkWidget *checkbtn_compose_with_format;
- GtkWidget *compose_override_from_format;
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;
/* apply to sub folders */
window,
vbox,
&page->checkbtn_compose_with_format,
- &page->compose_override_from_format,
&page->compose_subject_format,
&page->compose_body_format,
FALSE);
window,
vbox,
&page->checkbtn_reply_with_format,
- &page->reply_override_from_format,
&page->reply_quotemark,
&page->reply_body_format,
FALSE);
window,
vbox,
&page->checkbtn_forward_with_format,
- &page->forward_override_from_format,
&page->forward_quotemark,
&page->forward_body_format,
FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(page->checkbtn_compose_with_format),
item->prefs->compose_with_format);
- pref_set_entry_from_pref(GTK_ENTRY(page->compose_override_from_format),
- item->prefs->compose_override_from_format);
pref_set_entry_from_pref(GTK_ENTRY(page->compose_subject_format),
item->prefs->compose_subject_format);
pref_set_textview_from_pref(GTK_TEXT_VIEW(page->compose_body_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),
item->prefs->reply_body_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),
item->prefs->forward_body_format);
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(
- GTK_ENTRY(page->compose_override_from_format));
prefs->compose_subject_format = pref_get_pref_from_entry(
GTK_ENTRY(page->compose_subject_format));
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);
}
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);
}
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);
}
window,
vbox2,
&prefs_quote->checkbtn_compose_with_format,
- NULL,
&prefs_quote->entry_subject,
&prefs_quote->text_format,
FALSE);
window,
vbox2,
NULL,
- NULL,
&prefs_quote->entry_quotemark,
&prefs_quote->text_quotefmt,
FALSE);
window,
vbox2,
NULL,
- NULL,
&prefs_quote->entry_fw_quotemark,
&prefs_quote->text_fw_quotefmt,
FALSE);
prefs_common.compose_body_format = pref_get_pref_from_textview(
GTK_TEXT_VIEW(page->text_format));
quotefmt_check_new_msg_formats(prefs_common.compose_with_format,
- NULL,
- prefs_common.compose_subject_format,
- prefs_common.compose_body_format);
+ 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, prefs_common.quotemark, 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, prefs_common.fw_quotemark, prefs_common.fw_quotefmt);
}
static void prefs_quote_destroy_widget(PrefsPage *_page)
GtkWidget *list_view;
GtkWidget *entry_name;
GtkWidget *entry_subject;
- GtkWidget *entry_from;
GtkWidget *entry_to;
GtkWidget *entry_cc;
GtkWidget *entry_bcc;
GtkWidget *scrolled_window;
GtkWidget *vpaned;
GtkWidget *vbox1;
- GtkWidget *table; /* including : entry_[name|from|to|cc|bcc|subject] */
+ GtkWidget *table; /* including : entry_[name|to|cc|bcc|subject] */
GtkWidget *scroll2;
GtkWidget *text_value;
GtkWidget *vbox2;
} tab[] = {
{_("Name"), &templates.entry_name, FALSE,
_("This name is used as the Menu item")},
- {_("From"), &templates.entry_from, TRUE,
- _("Override composing account's From header. This doesn't change the composing account.")},
{_("To"), &templates.entry_to, TRUE, NULL},
{_("Cc"), &templates.entry_cc, TRUE, NULL},
{_("Bcc"), &templates.entry_bcc, TRUE, NULL},
GtkTextBuffer *buffer;
gtk_entry_set_text(GTK_ENTRY(templates.entry_name), "");
- gtk_entry_set_text(GTK_ENTRY(templates.entry_from), "");
gtk_entry_set_text(GTK_ENTRY(templates.entry_to), "");
gtk_entry_set_text(GTK_ENTRY(templates.entry_cc), "");
gtk_entry_set_text(GTK_ENTRY(templates.entry_bcc), "");
ntmpl->subject = tmpl->subject && *(tmpl->subject)
? g_strdup(tmpl->subject)
: NULL;
- ntmpl->from = tmpl->from && *(tmpl->from)
- ? g_strdup(tmpl->from)
- : NULL;
ntmpl->to = tmpl->to && *(tmpl->to)
? g_strdup(tmpl->to)
: NULL;
Template *tmpl;
gchar *name;
gchar *subject;
- gchar *from;
gchar *to;
gchar *cc;
gchar *bcc;
g_free(value);
return FALSE;
}
- from = gtk_editable_get_chars(GTK_EDITABLE(templates.entry_from),
- 0, -1);
to = gtk_editable_get_chars(GTK_EDITABLE(templates.entry_to),
0, -1);
cc = gtk_editable_get_chars(GTK_EDITABLE(templates.entry_cc),
subject = gtk_editable_get_chars(GTK_EDITABLE(templates.entry_subject),
0, -1);
- if (from && *from == '\0') {
- g_free(from);
- from = NULL;
- }
if (to && *to == '\0') {
g_free(to);
to = NULL;
subject = NULL;
}
- if (!prefs_template_string_is_valid(to, NULL, FALSE)) {
- alertpanel_error(_("Template From format error."));
- g_free(from);
- g_free(value);
- return FALSE;
- }
if (!prefs_template_string_is_valid(to, NULL, FALSE)) {
alertpanel_error(_("Template To format error."));
g_free(to);
tmpl->load_filename = NULL;
tmpl->name = name;
tmpl->subject = subject;
- tmpl->from = from;
tmpl->to = to;
tmpl->cc = cc;
tmpl->bcc = bcc;
tmpl_def.name = _("Template");
tmpl_def.subject = "";
- tmpl_def.from = "";
tmpl_def.to = "";
tmpl_def.cc = "";
tmpl_def.bcc = "";
tmpl = &tmpl_def;
gtk_entry_set_text(GTK_ENTRY(templates.entry_name), tmpl->name);
- gtk_entry_set_text(GTK_ENTRY(templates.entry_from),
- tmpl->from ? tmpl->from : "");
gtk_entry_set_text(GTK_ENTRY(templates.entry_to),
tmpl->to ? tmpl->to : "");
gtk_entry_set_text(GTK_ENTRY(templates.entry_cc),
void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
GtkWidget *parent_box,
GtkWidget **checkbtn_compose_with_format,
- GtkWidget **override_from_format,
GtkWidget **edit_subject_format,
GtkWidget **edit_body_format,
gboolean add_info_button)
GtkWidget *checkbtn_use_format = NULL;
GtkWidget *vbox_format;
GtkWidget *hbox_format;
- GtkWidget *hbox2_format;
- GtkWidget *label_from;
- GtkWidget *entry_from;
GtkWidget *label_subject;
GtkWidget *entry_subject;
GtkWidget *scrolledwin_format;
gtk_container_add(GTK_CONTAINER (parent_box), vbox_format);
gtk_container_set_border_width (GTK_CONTAINER (vbox_format), 8);
- if (override_from_format) {
- hbox2_format = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox2_format);
- gtk_box_pack_start (GTK_BOX (vbox_format), hbox2_format, FALSE, FALSE, 0);
-
- label_from = gtk_label_new (_("From"));
- gtk_widget_show (label_from);
- gtk_box_pack_start (GTK_BOX (hbox2_format), label_from, FALSE, FALSE, 0);
-
- entry_from = gtk_entry_new ();
- gtk_widget_show (entry_from);
- gtk_box_pack_start (GTK_BOX (hbox2_format), entry_from, TRUE, TRUE, 0);
- gtk_widget_set_size_request (entry_from, 100, -1);
-
- gtk_tooltips_set_tip(gtk_tooltips_new(), entry_from,
- _("Override From header. This doesn't change the account used to compose the new message."),
- NULL);
- }
-
hbox_format = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox_format);
gtk_box_pack_start (GTK_BOX (vbox_format), hbox_format, FALSE, FALSE, 0);
if (checkbtn_compose_with_format) {
SET_TOGGLE_SENSITIVITY(checkbtn_use_format, label_subject);
- if (override_from_format)
- SET_TOGGLE_SENSITIVITY(checkbtn_use_format, entry_from);
SET_TOGGLE_SENSITIVITY(checkbtn_use_format, entry_subject);
SET_TOGGLE_SENSITIVITY(checkbtn_use_format, text_format);
}
if (checkbtn_compose_with_format)
*checkbtn_compose_with_format = checkbtn_use_format;
- if (override_from_format)
- *override_from_format = entry_from;
*edit_subject_format = entry_subject;
*edit_body_format = text_format;
}
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)
GtkWidget *vbox_quote;
GtkWidget *hbox1;
GtkWidget *hbox2;
- GtkWidget *hbox3;
GtkWidget *label_quotemark;
GtkWidget *entry_quotemark;
- GtkWidget *label_from;
- GtkWidget *entry_from;
GtkWidget *scrolledwin_quotefmt;
GtkWidget *text_quotefmt;
gtk_container_add(GTK_CONTAINER (parent_box), vbox_quote);
gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
- if (override_from_format) {
- hbox3 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox3);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox3, FALSE, FALSE, 0);
-
- label_from = gtk_label_new (_("From"));
- gtk_widget_show (label_from);
- gtk_box_pack_start (GTK_BOX (hbox3), label_from, FALSE, FALSE, 0);
-
- entry_from = gtk_entry_new ();
- gtk_widget_show (entry_from);
- gtk_box_pack_start (GTK_BOX (hbox3), entry_from, TRUE, TRUE, 0);
- gtk_widget_set_size_request (entry_from, 100, -1);
-
- gtk_tooltips_set_tip(gtk_tooltips_new(), entry_from,
- _("Override From header. This doesn't change the account used to reply."),
- NULL);
- }
-
hbox1 = gtk_hbox_new (FALSE, 32);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
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, text_quotefmt);
}
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;
}
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)
GtkWidget *vbox_quote;
GtkWidget *hbox1;
GtkWidget *hbox2;
- GtkWidget *hbox3;
GtkWidget *label_quotemark;
GtkWidget *entry_fw_quotemark;
- GtkWidget *label_from;
- GtkWidget *entry_from;
GtkWidget *scrolledwin_quotefmt;
GtkWidget *text_fw_quotefmt;
gtk_container_add(GTK_CONTAINER (parent_box), vbox_quote);
gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
- if (override_from_format) {
- hbox3 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox3);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox3, FALSE, FALSE, 0);
-
- label_from = gtk_label_new (_("From"));
- gtk_widget_show (label_from);
- gtk_box_pack_start (GTK_BOX (hbox3), label_from, FALSE, FALSE, 0);
-
- entry_from = gtk_entry_new ();
- gtk_widget_show (entry_from);
- gtk_box_pack_start (GTK_BOX (hbox3), entry_from, TRUE, TRUE, 0);
- gtk_widget_set_size_request (entry_from, 100, -1);
-
- gtk_tooltips_set_tip(gtk_tooltips_new(), entry_from,
- _("Override From header. This doesn't change the account used to forward."),
- NULL);
- }
-
hbox1 = gtk_hbox_new (FALSE, 32);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
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, text_fw_quotefmt);
}
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;
}
void quotefmt_check_new_msg_formats(gboolean use_format,
- 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))
- alertpanel_error(_("New message From format error."));
-
if (!prefs_template_string_is_valid(subject_fmt, NULL, FALSE))
alertpanel_error(_("New message subject format error."));
}
void quotefmt_check_reply_formats(gboolean use_format,
- gchar *override_from_fmt,
gchar *quotation_mark,
gchar *body_fmt)
{
if (!prefs_template_string_is_valid(quotation_mark, NULL, FALSE))
alertpanel_error(_("Message reply quotation mark format error."));
- if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, FALSE))
- alertpanel_error(_("Message reply From format error."));
-
if (!prefs_template_string_is_valid(body_fmt, &line, TRUE)) {
alertpanel_error(_("Message reply format error at line %d."), line);
}
}
void quotefmt_check_forward_formats(gboolean use_format,
- gchar *override_from_fmt,
gchar *quotation_mark,
gchar *body_fmt)
{
if (!prefs_template_string_is_valid(quotation_mark, NULL, FALSE))
alertpanel_error(_("Message forward quotation mark format error."));
- if (override_from_fmt && !prefs_template_string_is_valid(override_from_fmt, NULL, FALSE))
- alertpanel_error(_("Message forward From format error."));
-
+fprintf(stderr, "\n%s\n", body_fmt);
if (!prefs_template_string_is_valid(body_fmt, &line, TRUE)) {
alertpanel_error(_("Message forward format error at line %d."), line);
}
void quotefmt_create_new_msg_fmt_widgets(GtkWindow *parent_window,
GtkWidget *parent_box,
GtkWidget **checkbtn_compose_with_format,
- GtkWidget **override_from_format,
GtkWidget **edit_subject_format,
GtkWidget **edit_body_format,
gboolean add_info_button);
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 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 quotefmt_add_info_button(GtkWindow *parent_window, GtkWidget *parent_box);
void quotefmt_check_new_msg_formats(gboolean use_format,
- gchar *override_from_fmt,
gchar *subject_fmt,
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);