aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 53e2fff906..73379af0ed 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1976,7 +1976,7 @@ emu_addr_cancel_book(void *data)
}
gboolean
-em_utils_in_addressbook(CamelInternetAddress *iaddr)
+em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
{
GError *err = NULL;
GSList *s, *g, *addr_sources = NULL;
@@ -2027,6 +2027,9 @@ em_utils_in_addressbook(CamelInternetAddress *iaddr)
/* FIXME: this aint threadsafe by any measure, but what can you do eh??? */
for (g = e_source_list_peek_groups(emu_addr_list);g;g=g_slist_next(g)) {
+ if (local_only && e_source_group_peek_base_uri ((ESourceGroup *)g->data) && !g_str_has_prefix (e_source_group_peek_base_uri ((ESourceGroup *)g->data), "file://"))
+ continue;
+
for (s = e_source_group_peek_sources((ESourceGroup *)g->data);s;s=g_slist_next(s)) {
ESource *src = s->data;
const char *completion = e_source_get_property (src, "completion");