[empathy] Improve code readability



commit d857e3d568b7ba4c1dd43e2f1f7c467190e0dce4
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Wed May 27 12:10:31 2009 -0400

    Improve code readability
    
    Rename userdata to contact,
    wrap at 80 chars
---
 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 cfdbf8c..92b5b90 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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]