GNOME Bugzilla – Bug 678156
[new roster] People nearby group
Last modified: 2012-06-20 11:50:20 UTC
We should re-implement the 'People nearby' group.
Created attachment 216753 [details] [review] Create and use People Nearby group
Review of attachment 216753 [details] [review]: ::: libempathy-gtk/empathy-roster-view.c @@ +168,3 @@ +static gboolean +is_xmpp_local_contact(FolksIndividual *individual) missing space before '('; make check should catch this. @@ +174,3 @@ + const gchar *protocol_name = NULL; + + contact = empathy_contact_dup_from_folks_individual (individual); the contact is leaked. YOu should unref it once you're done with it. @@ +175,3 @@ + + contact = empathy_contact_dup_from_folks_individual (individual); + EmpathyContact *contact; you can early return if contact == NULL to reduce nesting. @@ +244,3 @@ if (!tp_strdiff (group, TOP_GROUP)) roster_group = empathy_roster_group_new (group, "emblem-favorite-symbolic"); + else if(!tp_strdiff (group, PEOPLE_NEARBY)) missing space.
Created attachment 216808 [details] [review] Create and use People Nearby group
Review of attachment 216808 [details] [review]: ::: libempathy-gtk/empathy-roster-view.c @@ +182,3 @@ + g_object_unref (contact); + + contact = empathy_contact_dup_from_folks_individual (individual); You are using an object (connection) borrowed from another object (contact) you should unref. So, in theory, the connection could have been destroyed when you unrefed the contact. In pratice it works because the TpConnection is shared accross tp-glib but it's best to keep it safe. you can do something like: result = !tp_strdiff (); g_object_unref (contact); return result;
Created attachment 216816 [details] [review] Create and use People Nearby group
Review of attachment 216816 [details] [review]: Looks good, thanks!
Attachment 216816 [details] pushed as d3d7a1f - Create and use People Nearby group