From 94d32934ce6f9f4f22b314d262b7b2e7f15fa400 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Mon, 15 Dec 2008 16:17:45 -0500 Subject: When updating the resources, check for changed location --- libempathy-gtk/empathy-location-manager.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'libempathy-gtk/empathy-location-manager.c') diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c index f71f3cebf..9fda2f90d 100644 --- a/libempathy-gtk/empathy-location-manager.c +++ b/libempathy-gtk/empathy-location-manager.c @@ -397,7 +397,19 @@ update_resources (EmpathyLocationManager *location_manager) if (!geoclue_master_client_set_requirements (priv->gc_client, GEOCLUE_ACCURACY_LEVEL_LOCALITY, 0, TRUE, priv->resources, NULL)) - g_printerr ("set_requirements failed"); + { + g_printerr ("set_requirements failed"); + return; + } + + if (!priv->is_setup) + return; + + geoclue_address_get_address_async (priv->gc_address, + initial_address_cb, location_manager); + geoclue_position_get_position_async (priv->gc_position, + initial_position_cb, location_manager); + } @@ -450,6 +462,7 @@ setup_geoclue (EmpathyLocationManager *location_manager) initial_address_cb, location_manager); geoclue_position_get_position_async (priv->gc_position, initial_position_cb, location_manager); + } static void -- cgit v1.2.3