From e9f2d81aafc3d39e2838ea931c048e05b466f9a2 Mon Sep 17 00:00:00 2001 From: hiro Date: Mon, 28 Feb 2005 07:19:02 +0000 Subject: generate References: from In-Reply-To: even if the parent message doesn't have Message-Id:. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@133 ee746299-78ed-0310-b773-934348b2243d --- AUTHORS | 1 + ChangeLog | 6 ++++++ ChangeLog.ja | 6 ++++++ src/compose.c | 18 +++++++++++++----- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 2453378d..7f141d02 100644 --- a/AUTHORS +++ b/AUTHORS @@ -118,3 +118,4 @@ contributors (beside the above; based on Changelog) IWAMOTO Kouichi Sergey Pinaev Hiroyuki Ikezoe + mori diff --git a/ChangeLog b/ChangeLog index 6018a375..ee3882fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-28 + + * src/compose.c: compose_parse_header(): generate References: from + In-Reply-To: even if the parent message doesn't have Message-Id: + (thanks to mori). + 2005-02-28 * src/procheader.[ch]: fixed the argument type of buffer length diff --git a/ChangeLog.ja b/ChangeLog.ja index 9ec463fc..3e4ddd40 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,9 @@ +2005-02-28 + + * src/compose.c: compose_parse_header(): 親メッセージが Message-Id: + を持っていない場合でも In-Reply-To: から References: を生成する + ようにした(mori さん thanks)。 + 2005-02-28 * src/procheader.[ch]: バッファ長の引数の型を修正(Alfons さん thanks)。 diff --git a/src/compose.c b/src/compose.c index 4f81babc..3293b79f 100644 --- a/src/compose.c +++ b/src/compose.c @@ -1216,13 +1216,17 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo) hentry[H_LIST_POST].body = NULL; } - if (compose->mode == COMPOSE_REEDIT && msginfo->inreplyto) - compose->inreplyto = g_strdup(msginfo->inreplyto); - else if (compose->mode != COMPOSE_REEDIT && - msginfo->msgid && *msginfo->msgid) { + if (compose->mode == COMPOSE_REEDIT) { + if (msginfo->inreplyto && *msginfo->inreplyto) + compose->inreplyto = g_strdup(msginfo->inreplyto); + return 0; + } + + if (msginfo->msgid && *msginfo->msgid) compose->inreplyto = g_strdup(msginfo->msgid); - if (!compose->references) { + if (!compose->references) { + if (msginfo->msgid && *msginfo->msgid) { if (msginfo->inreplyto && *msginfo->inreplyto) compose->references = g_strdup_printf("<%s>\n\t<%s>", @@ -1232,6 +1236,10 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo) compose->references = g_strconcat("<", msginfo->msgid, ">", NULL); + } else if (msginfo->inreplyto && *msginfo->inreplyto) { + compose->references = + g_strconcat("<", msginfo->inreplyto, ">", + NULL); } } -- cgit v1.2.3