aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-26 08:29:50 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-26 08:29:50 +0000
commit9aa18447c97fffa8f46dbc8752ddf3b5dcbdd4f1 (patch)
tree3492d164dad2e2397e74af466882ca47ae014ddc
parent3a222b6d435f8720c2c0fa9932862c0e6434b0c2 (diff)
modification for ML post with Reply-To.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@688 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja8
-rw-r--r--libsylph/utils.c16
-rw-r--r--libsylph/utils.h3
-rw-r--r--src/compose.c8
5 files changed, 40 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c586aacf..3168d10e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2005-10-26
+ * libsylph/utils.[ch]: address_equal(): new.
+ * src/compose.c: compose_reply_set_entry(): when replying to ML post
+ that has the Reply-To set, set the ML address in To: and Reply-To
+ address in Cc: (thanks to Colin Leroy).
+
+2005-10-26
+
* libsylph/utils.c: uri_list_extract_filenames(): use GLib functions
to extract URIs if available.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index fcdea38b..1da4e24b 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,13 @@
2005-10-26
+ * libsylph/utils.[ch]: address_equal(): 新規。
+ * src/compose.c: compose_reply_set_entry(): ML の投稿に返信するときに
+ Reply-To が指定されていた場合、 ML のアドレスを To: にセットし、
+ Reply-To のアドレスを Cc: にセットするようにした(Colin Leroy さん
+ thanks)。
+
+2005-10-26
+
* libsylph/utils.c: uri_list_extract_filenames(): 利用可能であれば
URI を展開するのに GLib の関数を使用するようにした。
diff --git a/libsylph/utils.c b/libsylph/utils.c
index 95bc237f..0ad23c3a 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -822,6 +822,22 @@ gchar *normalize_address_field(const gchar *str)
return ret_str;
}
+gboolean address_equal(const gchar *addr1, const gchar *addr2)
+{
+ gchar *addr1_, *addr2_;
+
+ if (!addr1 || !addr2)
+ return FALSE;
+
+ Xstrdup_a(addr1_, addr1, return FALSE);
+ Xstrdup_a(addr2_, addr2, return FALSE);
+
+ extract_address(addr1_);
+ extract_address(addr2_);
+
+ return strcmp(addr1_, addr2_) == 0;
+}
+
GSList *address_list_append_orig(GSList *addr_list, const gchar *str)
{
const gchar *p = str, *q;
diff --git a/libsylph/utils.h b/libsylph/utils.h
index bc704e8e..8ef85896 100644
--- a/libsylph/utils.h
+++ b/libsylph/utils.h
@@ -276,6 +276,9 @@ void extract_list_id_str (gchar *str);
gchar *normalize_address_field (const gchar *str);
+gboolean address_equal (const gchar *addr1,
+ const gchar *addr2);
+
GSList *address_list_append_orig (GSList *addr_list,
const gchar *str);
GSList *address_list_append (GSList *addr_list,
diff --git a/src/compose.c b/src/compose.c
index 7e46db86..c7820f37 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -1488,10 +1488,14 @@ static void compose_reply_set_entry(Compose *compose, MsgInfo *msginfo,
}
if (compose->account->protocol != A_NNTP) {
- if (!compose->replyto && to_ml && compose->ml_post)
+ if (to_ml && compose->ml_post) {
compose_entry_set(compose, compose->ml_post,
COMPOSE_ENTRY_TO);
- else
+ if (compose->replyto &&
+ !address_equal(compose->replyto, compose->ml_post))
+ compose_entry_set(compose, compose->replyto,
+ COMPOSE_ENTRY_CC);
+ } else
compose_entry_set(compose,
(compose->replyto && !ignore_replyto)
? compose->replyto