aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-08-30 18:06:42 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-08-30 18:08:50 +0800
commitc11c1cb31e7b46f89de4fd41f9d75f2731c5ded0 (patch)
tree0cf839f71fda3085781f5c067ecc70e47ba8f1f1 /libempathy-gtk
parent07b33c748d2227f6932afbcc1dc44a404354ec83 (diff)
downloadgsoc2013-empathy-c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0.tar
gsoc2013-empathy-c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0.tar.gz
gsoc2013-empathy-c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0.tar.bz2
gsoc2013-empathy-c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0.tar.lz
gsoc2013-empathy-c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0.tar.xz
gsoc2013-empathy-c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0.tar.zst
gsoc2013-empathy-c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0.zip
roster-view: make sure the same contact isn't added twice to the same group
Calling empathy_roster_model_get_groups_for_individual() in individual_added may have the side effect for folks to discover the contact's groups and so fire a bunch of signals leading us to add the contact in the group. Then we look for his groups in individual_added() and re-add him a second time. Fix this by making sure we won't add the same contact twice to the same group. https://bugzilla.gnome.org/show_bug.cgi?id=683025
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-roster-view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index a820d2b62..4ad2d16ef 100644
--- a/libempathy-gtk/empathy-roster-view.c
+++ b/libempathy-gtk/empathy-roster-view.c
@@ -270,6 +270,9 @@ add_to_group (EmpathyRosterView *self,
if (contacts == NULL)
return;
+ if (g_hash_table_lookup (contacts, group) != NULL)
+ return;
+
if (tp_strdiff (group, NO_GROUP))
roster_group = ensure_roster_group (self, group);