to_hdr = prefs_common.trans_hdr ? _("To:") : "To:";
first_to_address = TRUE;
- first_cc_address = TRUE;
for (list = compose->header_list; list; list = list->next) {
headerentry = ((ComposeHeaderEntry *)list->data);
headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(headerentry->combo)->entry));
- if (g_utf8_collate(headerentryname, cc_hdr) == 0
- || g_utf8_collate(headerentryname, to_hdr) == 0) {
+ if (g_utf8_collate(headerentryname, to_hdr) == 0) {
const gchar *entstr = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
Xstrdup_a(str, entstr, return -1);
g_strstrip(str);
compose_convert_header
(buf, sizeof(buf), str,
strlen("Resent-To") + 2, TRUE);
- if (g_utf8_collate(headerentryname, to_hdr) == 0) {
- if (first_to_address) {
- fprintf(fp, "Resent-To: ");
- first_to_address = FALSE;
- } else {
- fprintf(fp, ",");
- }
- }
- if (g_utf8_collate(headerentryname, cc_hdr) == 0) {
- if (first_cc_address) {
- fprintf(fp, "\n");
- fprintf(fp, "Resent-Cc: ");
- first_cc_address = FALSE;
- } else {
- fprintf(fp, ",");
- }
- }
-
+
+ if (first_to_address) {
+ fprintf(fp, "Resent-To: ");
+ first_to_address = FALSE;
+ } else {
+ fprintf(fp, ",");
+ }
fprintf(fp, "%s", buf);
}
}
}
- /* if (!first_address) { */
- fprintf(fp, "\n");
- /* } */
+ if (!first_to_address) {
+ fprintf(fp, "\n");
+ }
+ first_cc_address = TRUE;
+ for (list = compose->header_list; list; list = list->next) {
+ headerentry = ((ComposeHeaderEntry *)list->data);
+ headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(headerentry->combo)->entry));
+
+ if (g_utf8_collate(headerentryname, cc_hdr) == 0) {
+ const gchar *strg = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
+ Xstrdup_a(str, strg, return -1);
+ g_strstrip(str);
+ if (str[0] != '\0') {
+ compose_convert_header
+ (buf, sizeof(buf), str,
+ strlen("Resent-Cc") + 2, TRUE);
+
+ if (first_cc_address) {
+ fprintf(fp, "Resent-Cc: ");
+ first_cc_address = FALSE;
+ } else {
+ fprintf(fp, ",");
+ }
+ fprintf(fp, "%s", buf);
+ }
+ }
+ }
+ if (!first_cc_address) {
+ fprintf(fp, "\n");
+ }
+
return(0);
}