aboutsummaryrefslogtreecommitdiff
path: root/src/compose.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-03-30 09:41:13 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-03-30 09:41:13 +0000
commite362a8bd4f3fe6415a6feaba2a67715c3615e68b (patch)
tree870c9a07b27ad9385688f7694e593dd3aa352cd4 /src/compose.c
parent75fe2bf35e4a37e59845d6ba0cc2f70352f56e5c (diff)
supported In-Reply-To header in mailto URL.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1586 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/compose.c')
-rw-r--r--src/compose.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/compose.c b/src/compose.c
index 959c3cb6..d1979af1 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -1277,9 +1277,10 @@ static void compose_entries_set(Compose *compose, const gchar *mailto)
gchar *to = NULL;
gchar *cc = NULL;
gchar *subject = NULL;
+ gchar *inreplyto = NULL;
gchar *body = NULL;
- scan_mailto_url(mailto, &to, &cc, NULL, &subject, &body);
+ scan_mailto_url(mailto, &to, &cc, NULL, &subject, &inreplyto, &body);
if (to)
compose_entry_set(compose, to, COMPOSE_ENTRY_TO);
@@ -1287,6 +1288,12 @@ static void compose_entries_set(Compose *compose, const gchar *mailto)
compose_entry_set(compose, cc, COMPOSE_ENTRY_CC);
if (subject)
compose_entry_set(compose, subject, COMPOSE_ENTRY_SUBJECT);
+ if (inreplyto) {
+ if (strchr(inreplyto, '<'))
+ extract_parenthesis(inreplyto, '<', '>');
+ remove_space(inreplyto);
+ compose->inreplyto = g_strdup(inreplyto);
+ }
if (body) {
GtkTextView *text = GTK_TEXT_VIEW(compose->text);
GtkTextBuffer *buffer;
@@ -1311,6 +1318,7 @@ static void compose_entries_set(Compose *compose, const gchar *mailto)
g_free(to);
g_free(cc);
g_free(subject);
+ g_free(inreplyto);
g_free(body);
}
@@ -1424,7 +1432,7 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
extract_address(hentry[H_LIST_POST].body);
if (hentry[H_LIST_POST].body[0] != '\0') {
scan_mailto_url(hentry[H_LIST_POST].body,
- &to, NULL, NULL, NULL, NULL);
+ &to, NULL, NULL, NULL, NULL, NULL);
if (to) {
g_free(compose->ml_post);
compose->ml_post = to;