aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-location-manager.c
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>2009-06-01 03:39:15 +0800
committerPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>2009-06-01 23:35:34 +0800
commit09f40353148d467db0464dc512c642c12418ecaa (patch)
tree0d38fa1bf6c44338e1539a2b25655ee8fc172026 /libempathy-gtk/empathy-location-manager.c
parent1e2fff115e8f2da4e42e780878f828ee174e3f4f (diff)
downloadgsoc2013-empathy-09f40353148d467db0464dc512c642c12418ecaa.tar
gsoc2013-empathy-09f40353148d467db0464dc512c642c12418ecaa.tar.gz
gsoc2013-empathy-09f40353148d467db0464dc512c642c12418ecaa.tar.bz2
gsoc2013-empathy-09f40353148d467db0464dc512c642c12418ecaa.tar.lz
gsoc2013-empathy-09f40353148d467db0464dc512c642c12418ecaa.tar.xz
gsoc2013-empathy-09f40353148d467db0464dc512c642c12418ecaa.tar.zst
gsoc2013-empathy-09f40353148d467db0464dc512c642c12418ecaa.zip
Get rid of Mission Control as EmpathyAccountManager does all that too
Diffstat (limited to 'libempathy-gtk/empathy-location-manager.c')
-rw-r--r--libempathy-gtk/empathy-location-manager.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 07b280bef..8eb062eb1 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -51,7 +51,6 @@ static EmpathyLocationManager *location_manager = NULL;
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyLocationManager)
typedef struct {
gboolean geoclue_is_setup;
- MissionControl *mc;
/* Contains the location to be sent to accounts. Geoclue is used
* to populate it. This HashTable uses Telepathy's style (string,
* GValue). Keys are defined in empathy-location.h
@@ -141,7 +140,7 @@ location_manager_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- EmpathyLocationManagerPriv *priv = GET_PRIV (object);
+ /*EmpathyLocationManagerPriv *priv = GET_PRIV (object); */
switch (param_id)
{
@@ -157,7 +156,7 @@ location_manager_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- EmpathyLocationManagerPriv *priv = GET_PRIV (object);
+ /* EmpathyLocationManagerPriv *priv = GET_PRIV (object); */
switch (param_id)
{
@@ -184,17 +183,18 @@ empathy_location_manager_class_init (EmpathyLocationManagerClass *class)
static void
publish_location (EmpathyLocationManager *location_manager,
- McAccount *account,
- gboolean force_publication)
+ McAccount *account,
+ gboolean force_publication)
{
EmpathyLocationManagerPriv *priv = GET_PRIV (location_manager);
guint connection_status = -1;
gboolean can_publish;
- EmpathyConf *conf = empathy_conf_get ();
TpConnection *conn;
+ EmpathyConf *conf = empathy_conf_get ();
EmpathyTpContactFactory *factory;
- conn = mission_control_get_tpconnection (priv->mc, account, NULL);
+ conn = empathy_account_manager_get_connection (priv->account_manager,
+ account);
if (!conn)
return;
@@ -208,15 +208,14 @@ publish_location (EmpathyLocationManager *location_manager,
return;
}
- connection_status = mission_control_get_connection_status (priv->mc,
- account, NULL);
+ connection_status = tp_connection_get_status (conn, NULL);
if (connection_status != TP_CONNECTION_STATUS_CONNECTED)
return;
- DEBUG ("Publishing %s location to account %s",
+ DEBUG ("Publishing %s location to connection %p",
(g_hash_table_size (priv->location) == 0 ? "empty" : ""),
- mc_account_get_display_name (account));
+ conn);
factory = empathy_tp_contact_factory_dup_singleton (conn);
empathy_tp_contact_factory_set_location (factory, priv->location);
@@ -603,7 +602,6 @@ empathy_location_manager_init (EmpathyLocationManager *location_manager)
location_manager->priv = priv;
priv->geoclue_is_setup = FALSE;
- priv->mc = empathy_mission_control_dup_singleton ();
priv->location = g_hash_table_new_full (g_direct_hash, g_direct_equal,
g_free, (GDestroyNotify) tp_g_value_slice_free);