diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-12-21 07:35:15 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-12-21 07:35:15 +0000 |
commit | 19453aea34c35def050511678fa4244c0ecdabb5 (patch) | |
tree | 7edba71c5c8b2a6a4e26f00b2432a2ae325ef12e /libsylph/utils.c | |
parent | 96ac773bf82363529a25fd85cb32e53cc0faa10a (diff) |
added option to set only mail address of recipients when replying.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2404 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/utils.c')
-rw-r--r-- | libsylph/utils.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libsylph/utils.c b/libsylph/utils.c index 3a14e690..e9eba77a 100644 --- a/libsylph/utils.c +++ b/libsylph/utils.c @@ -947,6 +947,30 @@ void extract_list_id_str(gchar *str) g_strstrip(str); } +gchar *extract_addresses(const gchar *str) +{ + GString *new_str; + GSList *addr_list, *cur; + + if (!str) + return NULL; + + addr_list = address_list_append(NULL, str); + + new_str = g_string_new(NULL); + + for (cur = addr_list; cur != NULL; cur = cur->next) { + g_string_append(new_str, (gchar *)cur->data); + if (cur->next) + g_string_append(new_str, ", "); + } + + slist_free_strings(addr_list); + g_slist_free(addr_list); + + return g_string_free(new_str, FALSE); +} + gchar *normalize_address_field(const gchar *str) { GString *new_str; |