From: Paul Mangan Date: Thu, 13 Feb 2003 13:25:31 +0000 (+0000) Subject: fix 'Follow-up and Reply-to' X-Git-Tag: rel_0_8_11~123 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=73e2c09783267b36891008b8aa516a96704ae0da fix 'Follow-up and Reply-to' --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 19cbb7455..294aea8aa 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,14 @@ +2003-02-13 [paul] 0.8.10claws7 + + * src/compose.[ch] + src/summaryview.c + fix 'Follow-up and Reply-to' so that it creates a reply to + the newsgroup and the sender. If the message has the keyword + 'poster' in the Followup-To header, all replies go to the + sender, re: RFC 1036, Section 2.2.3 + rename all instances of 'ignore_replyto' to 'to_sender', both + were previously used, now we use just one. + 2003-02-13 [paul] 0.8.10claws6 * sync with 0.8.10cvs9 diff --git a/configure.ac b/configure.ac index 45d10808c..d45730230 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=10 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws6 +EXTRA_VERSION=claws7 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/compose.c b/src/compose.c index beb0fd70e..666f67818 100644 --- a/src/compose.c +++ b/src/compose.c @@ -455,7 +455,7 @@ static void text_inserted (GtkWidget *widget, Compose *compose); static void compose_generic_reply(MsgInfo *msginfo, gboolean quote, gboolean to_all, gboolean to_ml, - gboolean ignore_replyto, + gboolean to_sender, gboolean followup_and_reply_to, const gchar *body); @@ -786,25 +786,25 @@ Compose *compose_new_followup_and_replyto(PrefsAccount *account, */ void compose_reply(MsgInfo *msginfo, gboolean quote, gboolean to_all, - gboolean to_ml, gboolean ignore_replyto, + gboolean to_ml, gboolean to_sender, const gchar *body) { compose_generic_reply(msginfo, quote, to_all, to_ml, - ignore_replyto, FALSE, body); + to_sender, FALSE, body); } void compose_followup_and_reply_to(MsgInfo *msginfo, gboolean quote, gboolean to_all, - gboolean ignore_replyto, + gboolean to_sender, const gchar *body) { compose_generic_reply(msginfo, quote, to_all, FALSE, - ignore_replyto, TRUE, body); + to_sender, TRUE, body); } static void compose_generic_reply(MsgInfo *msginfo, gboolean quote, gboolean to_all, gboolean to_ml, - gboolean ignore_replyto, + gboolean to_sender, gboolean followup_and_reply_to, const gchar *body) { @@ -820,7 +820,7 @@ static void compose_generic_reply(MsgInfo *msginfo, gboolean quote, g_return_if_fail(account != NULL); - if (ignore_replyto && account->protocol == A_NNTP && + if (to_sender && account->protocol == A_NNTP && !followup_and_reply_to) { reply_account = account_find_from_address(account->address); @@ -856,7 +856,7 @@ static void compose_generic_reply(MsgInfo *msginfo, gboolean quote, if (compose_parse_header(compose, msginfo) < 0) return; compose_reply_set_entry(compose, msginfo, to_all, to_ml, - ignore_replyto, followup_and_reply_to); + to_sender, followup_and_reply_to); compose_show_first_last_header(compose, TRUE); text = GTK_STEXT(compose->text); @@ -1629,7 +1629,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo, static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo, gboolean to_all, gboolean to_ml, - gboolean ignore_replyto, + gboolean to_sender, gboolean followup_and_reply_to) { GSList *cc_list = NULL; @@ -1641,13 +1641,13 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo, g_return_if_fail(compose->account != NULL); g_return_if_fail(msginfo != NULL); - if (compose->account->protocol != A_NNTP || followup_and_reply_to) { + if (compose->account->protocol != A_NNTP) { if (!compose->replyto && to_ml && compose->ml_post && !(msginfo->folder && msginfo->folder->prefs->enable_default_reply_to)) compose_entry_append(compose, compose->ml_post, COMPOSE_TO); - else if (!(to_all || ignore_replyto) + else if (!(to_all || to_sender) && msginfo->folder && msginfo->folder->prefs->enable_default_reply_to) { compose_entry_append(compose, @@ -1655,31 +1655,37 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo, COMPOSE_TO); } else compose_entry_append(compose, - (compose->replyto && !ignore_replyto) + (compose->replyto && !to_sender) ? compose->replyto : msginfo->from ? msginfo->from : "", COMPOSE_TO); } else { - if (ignore_replyto) + if (to_sender || (compose->followup_to && + strncmp(compose->followup_to, "poster\n", 7))) compose_entry_append - (compose, msginfo->from ? msginfo->from : "", + (compose, + ((compose->replyto && !to_sender) + ? compose->replyto + : msginfo->from ? msginfo->from : ""), COMPOSE_TO); - else { - if (compose->followup_to && !strncmp(compose->followup_to, "poster", 6)) { - compose_entry_append - (compose, - ((compose->replyto && !ignore_replyto) - ? compose->replyto - : msginfo->from ? msginfo->from : ""), - COMPOSE_TO); - } else { - compose_entry_append - (compose, - compose->followup_to ? compose->followup_to - : compose->newsgroups ? compose->newsgroups - : "", - COMPOSE_NEWSGROUPS); - } + + else if (followup_and_reply_to || to_all) { + compose_entry_append + (compose, + (compose->replyto + ? compose->replyto + : msginfo->from ? msginfo->from : ""), + COMPOSE_TO); + + compose_entry_append + (compose, + compose->newsgroups ? compose->newsgroups : "", + COMPOSE_NEWSGROUPS); + } else { + compose_entry_append + (compose, + compose->newsgroups ? compose->newsgroups : "", + COMPOSE_NEWSGROUPS); } } @@ -4044,7 +4050,8 @@ static gint compose_write_headers(Compose *compose, FILE *fp, /* Program version and system info */ /* uname(&utsbuf); */ - if (g_slist_length(compose->to_list) && !IS_IN_CUSTOM_HEADER("X-Mailer")) { + if (g_slist_length(compose->to_list) && !IS_IN_CUSTOM_HEADER("X-Mailer") && + !compose->newsgroup_list) { fprintf(fp, "X-Mailer: %s (GTK+ %d.%d.%d; %s)\n", prog_version, gtk_major_version, gtk_minor_version, gtk_micro_version, diff --git a/src/compose.h b/src/compose.h index be658283e..38567786c 100644 --- a/src/compose.h +++ b/src/compose.h @@ -225,13 +225,13 @@ Compose *compose_new_with_folderitem (PrefsAccount *account, void compose_followup_and_reply_to (MsgInfo *msginfo, gboolean quote, gboolean to_all, - gboolean ignore_replyto, + gboolean to_sender, const gchar *body); void compose_reply (MsgInfo *msginfo, gboolean quote, gboolean to_all, gboolean to_ml, - gboolean ignore_replyto, + gboolean to_sender, const gchar *body); Compose *compose_forward (PrefsAccount *account, MsgInfo *msginfo, diff --git a/src/summaryview.c b/src/summaryview.c index 26302671d..0c0050792 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -4144,7 +4144,7 @@ void summary_reply(SummaryView *summaryview, ComposeMode mode) case COMPOSE_FOLLOWUP_AND_REPLY_TO: compose_followup_and_reply_to(msginfo, prefs_common.reply_with_quote, - FALSE, TRUE, text); + FALSE, FALSE, text); break; case COMPOSE_REPLY_TO_SENDER_WITH_QUOTE: compose_reply(msginfo, TRUE, FALSE, FALSE, TRUE, text);