aboutsummaryrefslogtreecommitdiff
path: root/src/template.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-14 02:03:26 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-14 02:03:26 +0000
commitc6f1f4203af22081420e0e26f2c0d2072b3481f8 (patch)
tree5b0aea5ff67ca526cce15bf32eaa9bb88cc619a4 /src/template.c
parent641b17c570f6ddefc1a1601224ff3df2f5f07253 (diff)
added Bcc: and Reply-To: to the template.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1423 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/template.c')
-rw-r--r--src/template.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/template.c b/src/template.c
index 6a1494f8..1ade3d6f 100644
--- a/src/template.c
+++ b/src/template.c
@@ -1,7 +1,7 @@
/*
* Sylpheed templates subsystem
* Copyright (C) 2001 Alexander Barinov
- * Copyright (C) 2001-2005 Hiroyuki Yamamoto
+ * Copyright (C) 2001-2006 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,6 +48,8 @@ static Template *template_load(gchar *filename)
tmpl->name = NULL;
tmpl->to = NULL;
tmpl->cc = NULL;
+ tmpl->bcc = NULL;
+ tmpl->replyto = NULL;
tmpl->subject = NULL;
tmpl->value = NULL;
@@ -60,6 +62,10 @@ static Template *template_load(gchar *filename)
tmpl->to = g_strdup(g_strstrip(buf + 3));
else if (!g_ascii_strncasecmp(buf, "Cc:", 3))
tmpl->cc = g_strdup(g_strstrip(buf + 3));
+ else if (!g_ascii_strncasecmp(buf, "Bcc:", 3))
+ tmpl->bcc = g_strdup(g_strstrip(buf + 4));
+ else if (!g_ascii_strncasecmp(buf, "Reply-To:", 9))
+ tmpl->replyto = g_strdup(g_strstrip(buf + 9));
else if (!g_ascii_strncasecmp(buf, "Subject:", 8))
tmpl->subject = g_strdup(g_strstrip(buf + 8));
}
@@ -194,6 +200,10 @@ void template_write_config(GSList *tmpl_list)
fprintf(fp, "To: %s\n", tmpl->to);
if (tmpl->cc && *tmpl->cc != '\0')
fprintf(fp, "Cc: %s\n", tmpl->cc);
+ if (tmpl->bcc && *tmpl->bcc != '\0')
+ fprintf(fp, "Bcc: %s\n", tmpl->bcc);
+ if (tmpl->replyto && *tmpl->replyto != '\0')
+ fprintf(fp, "Reply-To: %s\n", tmpl->replyto);
if (tmpl->subject && *tmpl->subject != '\0')
fprintf(fp, "Subject: %s\n", tmpl->subject);
fputs("\n", fp);