aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-27 21:34:39 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-30 17:33:14 +0800
commit7373f750b996baae4d229952a4e2a0140820487c (patch)
treee6f19106a5f9daf1fa9a3c72c34dda4ca5c728ae
parente1d5083710cbafe299f37ce280e48005eaf85dca (diff)
downloadgsoc2013-empathy-7373f750b996baae4d229952a4e2a0140820487c.tar
gsoc2013-empathy-7373f750b996baae4d229952a4e2a0140820487c.tar.gz
gsoc2013-empathy-7373f750b996baae4d229952a4e2a0140820487c.tar.bz2
gsoc2013-empathy-7373f750b996baae4d229952a4e2a0140820487c.tar.lz
gsoc2013-empathy-7373f750b996baae4d229952a4e2a0140820487c.tar.xz
gsoc2013-empathy-7373f750b996baae4d229952a4e2a0140820487c.tar.zst
gsoc2013-empathy-7373f750b996baae4d229952a4e2a0140820487c.zip
Fix calculation of the number of new personas in EmpathyIndividualWidget
-rw-r--r--libempathy-gtk/empathy-individual-widget.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index abf71d65b..7e4be2235 100644
--- a/libempathy-gtk/empathy-individual-widget.c
+++ b/libempathy-gtk/empathy-individual-widget.c
@@ -1610,7 +1610,7 @@ personas_changed_cb (FolksIndividual *individual,
EmpathyIndividualWidgetPriv *priv = GET_PRIV (self);
GList *personas, *l, *children;
gboolean show_personas, was_showing_personas, will_show_personas, is_last;
- guint old_num_personas, new_num_personas;
+ guint old_num_personas, new_num_personas = 0;
personas = folks_individual_get_personas (individual);
@@ -1618,7 +1618,12 @@ personas_changed_cb (FolksIndividual *individual,
* displaying, not the number of Personas which were in the Individual
* before. */
old_num_personas = g_hash_table_size (priv->persona_tables);
- new_num_personas = g_list_length (personas);
+
+ for (l = personas; l != NULL; l = l->next)
+ {
+ if (TPF_IS_PERSONA (l->data))
+ new_num_personas++;
+ }
/*
* What we display for various conditions: