[empathy] Use new GeocodeLocation API in geocode-glib 0.99.1
- From: Andreas Henriksson <ah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Use new GeocodeLocation API in geocode-glib 0.99.1
- Date: Wed, 14 Aug 2013 20:40:03 +0000 (UTC)
commit acaa1e4f9d2c5e746e895a7ca3e6002ac502cc2a
Author: Andreas Henriksson <andreas fatal se>
Date: Wed Aug 14 21:44:24 2013 +0200
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 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 3561044..8f9cb16 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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]