diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2008-03-13 07:20:09 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2008-03-13 07:20:09 +0000 |
commit | 7058b44969349cc7e32311228629c6bd8d221510 (patch) | |
tree | a1775b09ff7bc9c33891c1303fff7fe118a52785 /src | |
parent | 08fec279432e13eac7d6710a4307dcb312af812c (diff) |
fixed address completion.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1965 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/addr_compl.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/addr_compl.c b/src/addr_compl.c index 908b338e..94a18b33 100644 --- a/src/addr_compl.c +++ b/src/addr_compl.c @@ -276,15 +276,11 @@ gchar *get_address_from_edit(GtkEntry *entry, gint *start_pos) if (g_utf8_strlen(p, -1) == 0) return NULL; -#define IS_VALID_CHAR(x) \ - (g_ascii_isalnum(x) || (x) == '"' || (x) == '<' || ((guchar)(x) > 0x7f)) - /* now scan back until we hit a valid character */ - for (; *p && !IS_VALID_CHAR(*p); p = g_utf8_next_char(p)) + for (; *p && (*p == ',' || g_ascii_isspace(*p)); + p = g_utf8_next_char(p)) ; -#undef IS_VALID_CHAR - if (g_utf8_strlen(p, -1) == 0) return NULL; @@ -412,7 +408,7 @@ gchar *get_complete_address(gint index) if (!p->name || p->name[0] == '\0') address = g_strdup(p->address); else if (p->name[0] != '"' && - strpbrk(p->name, ",.[]<>") != NULL) + strpbrk(p->name, "(),.:;<>@[]") != NULL) address = g_strdup_printf ("\"%s\" <%s>", p->name, p->address); else |