aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c18
-rw-r--r--libempathy-gtk/empathy-contact-list-store.h1
2 files changed, 17 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 9feb4461f..25a2e7ad2 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -1037,6 +1037,7 @@ contact_list_store_add_contact (EmpathyContactListStore *store,
GList *groups = NULL, *l;
TpConnection *connection;
EmpathyContactListFlags flags = 0;
+ char *protocol_name;
priv = GET_PRIV (store);
@@ -1054,12 +1055,23 @@ contact_list_store_add_contact (EmpathyContactListStore *store,
flags = empathy_contact_manager_get_flags_for_connection (
EMPATHY_CONTACT_MANAGER (priv->list), connection);
}
+
+ tp_connection_parse_object_path (connection, &protocol_name, NULL);
+
if (!groups) {
#if HAVE_FAVOURITE_CONTACTS
GtkTreeIter iter_group;
- contact_list_store_get_group (store, EMPATHY_CONTACT_LIST_STORE_UNGROUPED,
- &iter_group, NULL, NULL, TRUE);
+ if (!tp_strdiff (protocol_name, "local-xmpp")) {
+ /* these are People Nearby */
+ contact_list_store_get_group (store,
+ EMPATHY_CONTACT_LIST_STORE_PEOPLE_NEARBY,
+ &iter_group, NULL, NULL, TRUE);
+ } else {
+ contact_list_store_get_group (store,
+ EMPATHY_CONTACT_LIST_STORE_UNGROUPED,
+ &iter_group, NULL, NULL, TRUE);
+ }
gtk_tree_store_insert_after (GTK_TREE_STORE (store), &iter,
&iter_group, NULL);
@@ -1089,6 +1101,8 @@ contact_list_store_add_contact (EmpathyContactListStore *store,
add_contact_to_store (GTK_TREE_STORE (store), &iter, contact, flags);
}
+ g_free (protocol_name);
+
/* Else add to each group. */
for (l = groups; l; l = l->next) {
GtkTreeIter iter_group;
diff --git a/libempathy-gtk/empathy-contact-list-store.h b/libempathy-gtk/empathy-contact-list-store.h
index 1b36ea651..7fa400e3d 100644
--- a/libempathy-gtk/empathy-contact-list-store.h
+++ b/libempathy-gtk/empathy-contact-list-store.h
@@ -69,6 +69,7 @@ typedef enum {
#define EMPATHY_CONTACT_LIST_STORE_UNGROUPED _("Ungrouped")
#define EMPATHY_CONTACT_LIST_STORE_FAVORITE _("Favorite People")
+#define EMPATHY_CONTACT_LIST_STORE_PEOPLE_NEARBY _("People Nearby")
struct _EmpathyContactListStore {
GtkTreeStore parent;