]> git.0d.be Git - empathy.git/commitdiff
Fix calculation of the number of new personas in EmpathyIndividualWidget
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 27 Aug 2010 13:34:39 +0000 (14:34 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Mon, 30 Aug 2010 09:33:14 +0000 (10:33 +0100)
libempathy-gtk/empathy-individual-widget.c

index abf71d65b40572ee70fe6e5b70b88e8ed4324138..7e4be2235ecdaf244b6e05136726368af1ef6a18 100644 (file)
@@ -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: