From ef63fc4cdc7bda74694a8a2af379e4c060a82e79 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Sat, 9 May 2009 16:42:12 -0400 Subject: Drop tp_contact_factory_update_location for code readability This function is an artefact from previous version of this functionality --- libempathy/empathy-tp-contact-factory.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index 4ab5fd4ba..0a118d636 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -314,21 +314,6 @@ tp_contact_factory_avatar_updated_cb (TpConnection *connection, g_array_free (handles, TRUE); } -static void -tp_contact_factory_update_location (EmpathyTpContactFactory *tp_factory, - guint handle, - GHashTable *location) -{ - EmpathyContact *contact; - - contact = tp_contact_factory_find_by_handle (tp_factory, handle); - if (contact == NULL) { - return; - } - - empathy_contact_set_location (contact, location); -} - static void tp_contact_factory_update_capabilities (EmpathyTpContactFactory *tp_factory, guint handle, @@ -424,12 +409,14 @@ tp_contact_factory_got_locations (TpProxy *tp_proxy, g_hash_table_iter_init (&iter, locations); while (g_hash_table_iter_next (&iter, &key, &value)) { - guint handle = GPOINTER_TO_INT (key); - GHashTable *location = value; + guint handle = GPOINTER_TO_INT (key); + GHashTable *location = value; + EmpathyContact *contact; - tp_contact_factory_update_location (tp_factory, - handle, - location); + contact = tp_contact_factory_find_by_handle (tp_factory, handle); + if (contact != NULL) { + empathy_contact_set_location (contact, location); + } } } -- cgit v1.2.3