diff options
author | Milan Crha <mcrha@redhat.com> | 2010-01-19 23:43:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-01-19 23:43:36 +0800 |
commit | 1699254d7f96516b6c58f811ccece891f070d872 (patch) | |
tree | eac2ceb0fc54710d0f12b456ab28809e560cf8e1 | |
parent | 2a2132e7726b6c251869a49351d912e40cb1cdbe (diff) | |
download | gsoc2013-evolution-1699254d7f96516b6c58f811ccece891f070d872.tar gsoc2013-evolution-1699254d7f96516b6c58f811ccece891f070d872.tar.gz gsoc2013-evolution-1699254d7f96516b6c58f811ccece891f070d872.tar.bz2 gsoc2013-evolution-1699254d7f96516b6c58f811ccece891f070d872.tar.lz gsoc2013-evolution-1699254d7f96516b6c58f811ccece891f070d872.tar.xz gsoc2013-evolution-1699254d7f96516b6c58f811ccece891f070d872.tar.zst gsoc2013-evolution-1699254d7f96516b6c58f811ccece891f070d872.zip |
Bug #603480 - [bbdb] Traverse lists in destinations properly
-rw-r--r-- | plugins/bbdb/bbdb.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index 7360e343d8..e3aa44fd61 100644 --- a/plugins/bbdb/bbdb.c +++ b/plugins/bbdb/bbdb.c @@ -230,19 +230,35 @@ bbdb_do_thread (const gchar *name, const gchar *email) static void walk_destinations_and_free (EDestination **dests) { + const gchar *name, *addr; gint i; if (!dests) return; for (i = 0; dests[i] != NULL; i++) { - const gchar *name, *addr; + if (e_destination_is_evolution_list (dests[i])) { + const GList *members; - name = e_destination_get_name (dests[i]); - addr = e_destination_get_email (dests[i]); + for (members = e_destination_list_get_dests (dests[i]); members; members = members->next) { + const EDestination *member = members->data; - if (name || addr) - bbdb_do_thread (name, addr); + if (!member) + continue; + + name = e_destination_get_name (member); + addr = e_destination_get_email (member); + + if (name || addr) + bbdb_do_thread (name, addr); + } + } else { + name = e_destination_get_name (dests[i]); + addr = e_destination_get_email (dests[i]); + + if (name || addr) + bbdb_do_thread (name, addr); + } } e_destination_freev (dests); |