From acaa1e4f9d2c5e746e895a7ca3e6002ac502cc2a Mon Sep 17 00:00:00 2001 From: Andreas Henriksson Date: Wed, 14 Aug 2013 21:44:24 +0200 Subject: Use new GeocodeLocation API in geocode-glib 0.99.1 Use new accessor functions. The location structure members has been hidden. Use regular g_object_unref, since the geocode_location_free has been removed. See: https://git.gnome.org/browse/geocode-glib/commit?id=5372f2f7ff97707dcc839bd3ed79ea9f289f7409 "lib: Turn GeocodeLocation into a proper GObject" https://bugzilla.gnome.org/show_bug.cgi?id=706020 --- libempathy/empathy-contact.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 356104434..8f9cb16a5 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -1617,7 +1617,6 @@ geocode_cb (GObject *source, GeocodeLocation *loc; GHashTable *new_location; GHashTable *resolved = NULL; - gdouble latitude, longitude; if (priv->location == NULL) goto out; @@ -1635,14 +1634,14 @@ geocode_cb (GObject *source, loc = res->data; new_location = tp_asv_new ( - EMPATHY_LOCATION_LAT, G_TYPE_DOUBLE, loc->latitude, - EMPATHY_LOCATION_LON, G_TYPE_DOUBLE, loc->longitude, + EMPATHY_LOCATION_LAT, G_TYPE_DOUBLE, geocode_location_get_latitude (loc), + EMPATHY_LOCATION_LON, G_TYPE_DOUBLE, geocode_location_get_longitude (loc), NULL); - DEBUG ("\t - Latitude: %f", loc->latitude); - DEBUG ("\t - Longitude: %f", loc->longitude); + DEBUG ("\t - Latitude: %f", geocode_location_get_latitude (loc)); + DEBUG ("\t - Longitude: %f", geocode_location_get_longitude (loc)); - g_list_free_full (res, (GDestroyNotify) geocode_location_free); + g_list_free_full (res, g_object_unref); /* Copy remaning fields. LAT and LON were not defined so we won't overwrite * the values we just set. */ -- cgit v1.2.3