diff options
author | Pierre-Luc Beaudoin <pierre-luc@pierlux.com> | 2009-05-28 00:10:31 +0800 |
---|---|---|
committer | Pierre-Luc Beaudoin <pierre-luc@pierlux.com> | 2009-05-28 00:52:10 +0800 |
commit | d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4 (patch) | |
tree | c12c98f67f371375e274ed6abe36c5905b787fc3 | |
parent | b9bb0f42712f601c11fcd3d312910da0fd72b6ed (diff) | |
download | gsoc2013-empathy-d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4.tar gsoc2013-empathy-d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4.tar.gz gsoc2013-empathy-d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4.tar.bz2 gsoc2013-empathy-d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4.tar.lz gsoc2013-empathy-d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4.tar.xz gsoc2013-empathy-d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4.tar.zst gsoc2013-empathy-d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4.zip |
Improve code readability
Rename userdata to contact,
wrap at 80 chars
-rw-r--r-- | libempathy/empathy-tp-contact-factory.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index cfdbf8c94..92b5b90f5 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -411,40 +411,43 @@ geocode_cb (GeoclueGeocode *geocode, double altitude, GeoclueAccuracy *accuracy, GError *error, - gpointer userdata) + gpointer contact) { GValue *new_value; GHashTable *location; - location = empathy_contact_get_location (EMPATHY_CONTACT (userdata)); + location = empathy_contact_get_location (EMPATHY_CONTACT (contact)); if (error != NULL) { DEBUG ("Error geocoding location : %s", error->message); g_object_unref (geocode); - g_object_unref (userdata); + g_object_unref (contact); return; } if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE) { new_value = tp_g_value_slice_new_double (latitude); - g_hash_table_replace (location, g_strdup (EMPATHY_LOCATION_LAT), new_value); + g_hash_table_replace (location, g_strdup (EMPATHY_LOCATION_LAT), + new_value); DEBUG ("\t - Latitude: %f", latitude); } if (fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) { new_value = tp_g_value_slice_new_double (longitude); - g_hash_table_replace (location, g_strdup (EMPATHY_LOCATION_LON), new_value); + g_hash_table_replace (location, g_strdup (EMPATHY_LOCATION_LON), + new_value); DEBUG ("\t - Longitude: %f", longitude); } if (fields & GEOCLUE_POSITION_FIELDS_ALTITUDE) { new_value = tp_g_value_slice_new_double (altitude); - g_hash_table_replace (location, g_strdup (EMPATHY_LOCATION_ALT), new_value); + g_hash_table_replace (location, g_strdup (EMPATHY_LOCATION_ALT), + new_value); DEBUG ("\t - Altitude: %f", altitude); } /* Don't change the accuracy as we used an address to get this position */ - g_object_notify (userdata, "location"); + g_object_notify (contact, "location"); g_object_unref (geocode); - g_object_unref (userdata); + g_object_unref (contact); } #endif |