aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-01-19 23:39:31 +0800
committerMilan Crha <mcrha@redhat.com>2010-01-19 23:39:31 +0800
commita26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a (patch)
tree8509ad75d5286ef853b573af8c60786cc49ce266 /plugins
parentad3995870b032a007bbfd488f1adc2d7d5f6b586 (diff)
downloadgsoc2013-evolution-a26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a.tar
gsoc2013-evolution-a26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a.tar.gz
gsoc2013-evolution-a26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a.tar.bz2
gsoc2013-evolution-a26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a.tar.lz
gsoc2013-evolution-a26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a.tar.xz
gsoc2013-evolution-a26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a.tar.zst
gsoc2013-evolution-a26fc50120fbe6ebbe8642d7ddb84e4c08d5c14a.zip
Bug #603480 - [bbdb] Traverse lists in destinations properly
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bbdb/bbdb.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index d9b1967f2e..f48745a364 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -268,19 +268,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);