Ejemplo n.º 1
0
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, TRUE, TRUE))
			alertpanel_error(_("The \"From\" field of the \"New message\" template contains an invalid email address."));

		if (!prefs_template_string_is_valid(subject_fmt, NULL, TRUE, FALSE))
			alertpanel_error(_("The \"Subject\" field of the \"New message\" template is invalid."));

		if (!prefs_template_string_is_valid(body_fmt, &line, TRUE, FALSE)) {
			alertpanel_error(_("The body of the \"New message\" template has an error at line %d."), line);
		}
	}
}
Ejemplo n.º 2
0
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."));

        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."));

        if (!prefs_template_string_is_valid(body_fmt, &line, TRUE, FALSE)) {
            alertpanel_error(_("The body of the \"Forward\" template has an error at line %d."), line);
        }
    }
}