+ /* 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);
+ }
+