]> git.0d.be Git - empathy.git/commitdiff
Re-add support for the "People Nearby" group
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 21 Jul 2010 10:57:08 +0000 (11:57 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 21 Jul 2010 11:13:26 +0000 (12:13 +0100)
libempathy-gtk/empathy-individual-store.c

index 84fcbe289bc8c19fd5855cff38b8e3edc0625a6b..da590608a6324160cb71ace1c6ec4a704535ae2d 100644 (file)
@@ -349,6 +349,7 @@ individual_store_add_individual (EmpathyIndividualStore *self,
   EmpathyContact *contact;
   TpConnection *connection;
   EmpathyIndividualManagerFlags flags = 0;
+  gchar *protocol_name;
 
   priv = GET_PRIV (self);
 
@@ -368,18 +369,23 @@ individual_store_add_individual (EmpathyIndividualStore *self,
   flags = empathy_individual_manager_get_flags_for_connection (manager,
       connection);
 
+  tp_connection_parse_object_path (connection, &protocol_name, NULL);
+
   if (groups == NULL)
     {
       GtkTreeIter iter_group, *parent;
 
       parent = &iter_group;
 
-      /* TODO: implement */
-      DEBUG ("forcing the People Nearby group even when 'show "
-          "groups' is off is unimplemented");
-
       if (!priv->show_groups)
         parent = NULL;
+      else if (!tp_strdiff (protocol_name, "local-xmpp"))
+        {
+          /* these are People Nearby */
+          individual_store_get_group (self,
+              EMPATHY_INDIVIDUAL_STORE_PEOPLE_NEARBY, &iter_group, NULL, NULL,
+              TRUE);
+        }
       else
         {
           individual_store_get_group (self,
@@ -391,6 +397,8 @@ individual_store_add_individual (EmpathyIndividualStore *self,
           individual, flags);
     }
 
+  g_free (protocol_name);
+
   /* Else add to each group. */
   for (l = groups; l; l = l->next)
     {