aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-28 00:10:31 +0800
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-28 00:52:10 +0800
commitd857e3d568b7ba4c1dd43e2f1f7c467190e0dce4 (patch)
treec12c98f67f371375e274ed6abe36c5905b787fc3 /libempathy
parentb9bb0f42712f601c11fcd3d312910da0fd72b6ed (diff)
downloadgsoc2013-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
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-contact-factory.c19
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