aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-list-store.c
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2010-03-22 13:19:14 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-03-24 16:42:04 +0800
commit505b19ef1cd82dd94c701c3229cbab6626855167 (patch)
tree084d74536d29a4b579e3633e58767793a67cec62 /libempathy-gtk/empathy-contact-list-store.c
parentd47742d59d3635d1dc78cc298244baaeede9f67d (diff)
downloadgsoc2013-empathy-505b19ef1cd82dd94c701c3229cbab6626855167.tar
gsoc2013-empathy-505b19ef1cd82dd94c701c3229cbab6626855167.tar.gz
gsoc2013-empathy-505b19ef1cd82dd94c701c3229cbab6626855167.tar.bz2
gsoc2013-empathy-505b19ef1cd82dd94c701c3229cbab6626855167.tar.lz
gsoc2013-empathy-505b19ef1cd82dd94c701c3229cbab6626855167.tar.xz
gsoc2013-empathy-505b19ef1cd82dd94c701c3229cbab6626855167.tar.zst
gsoc2013-empathy-505b19ef1cd82dd94c701c3229cbab6626855167.zip
Make People Nearby into a Fake Group like Ungrouped and Favourites
Diffstat (limited to 'libempathy-gtk/empathy-contact-list-store.c')
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c18
1 files changed, 16 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;