diff options
author | Pierre-Luc Beaudoin <pierre-luc@pierlux.com> | 2009-01-17 22:32:46 +0800 |
---|---|---|
committer | Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk> | 2009-06-01 23:35:31 +0800 |
commit | 2bf4823a18e5e140d13cfc37fa767b9e05daac02 (patch) | |
tree | 5aa38953f64c780635c2d7ab7c44270e3f299696 /libempathy-gtk/empathy-location-manager.c | |
parent | 30aa5cfac08630c0599088678a58f10389866221 (diff) | |
download | gsoc2013-empathy-2bf4823a18e5e140d13cfc37fa767b9e05daac02.tar gsoc2013-empathy-2bf4823a18e5e140d13cfc37fa767b9e05daac02.tar.gz gsoc2013-empathy-2bf4823a18e5e140d13cfc37fa767b9e05daac02.tar.bz2 gsoc2013-empathy-2bf4823a18e5e140d13cfc37fa767b9e05daac02.tar.lz gsoc2013-empathy-2bf4823a18e5e140d13cfc37fa767b9e05daac02.tar.xz gsoc2013-empathy-2bf4823a18e5e140d13cfc37fa767b9e05daac02.tar.zst gsoc2013-empathy-2bf4823a18e5e140d13cfc37fa767b9e05daac02.zip |
Various style fixes
Diffstat (limited to 'libempathy-gtk/empathy-location-manager.c')
-rw-r--r-- | libempathy-gtk/empathy-location-manager.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c index d00bce7b8..7a2b60c4a 100644 --- a/libempathy-gtk/empathy-location-manager.c +++ b/libempathy-gtk/empathy-location-manager.c @@ -114,11 +114,13 @@ publish_location (EmpathyLocationManager *location_manager, gboolean can_publish; EmpathyConf *conf = empathy_conf_get (); EmpathyContactFactory *factory = empathy_contact_factory_new (); + priv = GET_PRIV (location_manager); if (force_publication == FALSE) { - if (!empathy_conf_get_bool (conf, EMPATHY_PREFS_LOCATION_PUBLISH, &can_publish)) + if (!empathy_conf_get_bool (conf, EMPATHY_PREFS_LOCATION_PUBLISH, + &can_publish)) return; if (can_publish == FALSE) @@ -131,7 +133,8 @@ publish_location (EmpathyLocationManager *location_manager, if (connection_status != TP_CONNECTION_STATUS_CONNECTED) return; - DEBUG ("Publishing location to account %s", mc_account_get_display_name (account)); + DEBUG ("Publishing location to account %s", + mc_account_get_display_name (account)); empathy_contact_factory_set_location (factory, account, priv->location); } @@ -171,13 +174,13 @@ empathy_location_manager_init (EmpathyLocationManager *location_manager) { EmpathyConf *conf; EmpathyLocationManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (location_manager, - EMPATHY_TYPE_LOCATION_MANAGER, EmpathyLocationManagerPriv); + EMPATHY_TYPE_LOCATION_MANAGER, EmpathyLocationManagerPriv); location_manager->priv = priv; priv->is_setup = FALSE; priv->mc = empathy_mission_control_new (); - priv->location = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_free, - (GDestroyNotify) tp_g_value_slice_free); + priv->location = g_hash_table_new_full (g_direct_hash, g_direct_equal, + g_free, (GDestroyNotify) tp_g_value_slice_free); // Setup settings status callbacks conf = empathy_conf_get (); @@ -328,7 +331,8 @@ position_changed_cb (GeocluePosition *position, longitude += priv->reduce_value; new_value = tp_g_value_slice_new (G_TYPE_DOUBLE); g_value_set_double (new_value, longitude); - g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LON), new_value); + g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LON), + new_value); DEBUG ("\t - Longitude: %f", longitude); } if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE) @@ -336,14 +340,16 @@ position_changed_cb (GeocluePosition *position, latitude += priv->reduce_value; new_value = tp_g_value_slice_new (G_TYPE_DOUBLE); g_value_set_double (new_value, latitude); - g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LAT), new_value); + g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LAT), + new_value); DEBUG ("\t - Latitude: %f", latitude); } if (fields & GEOCLUE_POSITION_FIELDS_ALTITUDE) { new_value = tp_g_value_slice_new (G_TYPE_DOUBLE); g_value_set_double (new_value, altitude); - g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_ALT), new_value); + g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_ALT), + new_value); DEBUG ("\t - Altitude: %f", altitude); } @@ -352,12 +358,14 @@ position_changed_cb (GeocluePosition *position, mean = (horizontal + vertical) / 2.0; new_value = tp_g_value_slice_new (G_TYPE_DOUBLE); g_value_set_double (new_value, mean); - g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_ACCURACY), new_value); + g_hash_table_insert (priv->location, + g_strdup (EMPATHY_LOCATION_ACCURACY), new_value); DEBUG ("\t - Accuracy: %f", mean); } update_timestamp (location_manager, timestamp); - publish_location_to_all_accounts (EMPATHY_LOCATION_MANAGER (location_manager), FALSE); + publish_location_to_all_accounts (EMPATHY_LOCATION_MANAGER (location_manager), + FALSE); } @@ -419,7 +427,8 @@ address_changed_cb (GeoclueAddress *address, g_hash_table_foreach (details, address_foreach_cb, (gpointer)location_manager); update_timestamp (location_manager, timestamp); - publish_location_to_all_accounts (EMPATHY_LOCATION_MANAGER (location_manager), FALSE); + publish_location_to_all_accounts (EMPATHY_LOCATION_MANAGER (location_manager), + FALSE); } |