aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-location-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-04-29 17:44:49 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-05-02 03:47:54 +0800
commit97fc0a1dd8bd6bd293a09ce0dc34281068ccd620 (patch)
tree153e4c8f31db7be2e216f24e5567d27fee3c8407 /libempathy-gtk/empathy-location-manager.c
parentae49c73f899c8156333813484c6429fde8ce811a (diff)
downloadgsoc2013-empathy-97fc0a1dd8bd6bd293a09ce0dc34281068ccd620.tar
gsoc2013-empathy-97fc0a1dd8bd6bd293a09ce0dc34281068ccd620.tar.gz
gsoc2013-empathy-97fc0a1dd8bd6bd293a09ce0dc34281068ccd620.tar.bz2
gsoc2013-empathy-97fc0a1dd8bd6bd293a09ce0dc34281068ccd620.tar.lz
gsoc2013-empathy-97fc0a1dd8bd6bd293a09ce0dc34281068ccd620.tar.xz
gsoc2013-empathy-97fc0a1dd8bd6bd293a09ce0dc34281068ccd620.tar.zst
gsoc2013-empathy-97fc0a1dd8bd6bd293a09ce0dc34281068ccd620.zip
No need of a contact factory to set location
Diffstat (limited to 'libempathy-gtk/empathy-location-manager.c')
-rw-r--r--libempathy-gtk/empathy-location-manager.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 0165052e1..0a9d4dcf7 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -38,7 +38,6 @@
#include "libempathy/empathy-enum-types.h"
#include "libempathy/empathy-location.h"
-#include "libempathy/empathy-tp-contact-factory.h"
#include "libempathy/empathy-utils.h"
#define DEBUG_FLAG EMPATHY_DEBUG_LOCATION
@@ -183,6 +182,16 @@ empathy_location_manager_class_init (EmpathyLocationManagerClass *class)
}
static void
+publish_location_cb (TpConnection *connection,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
+{
+ if (error != NULL)
+ DEBUG ("Error setting location: %s", error->message);
+}
+
+static void
publish_location (EmpathyLocationManager *self,
TpConnection *conn,
gboolean force_publication)
@@ -191,7 +200,6 @@ publish_location (EmpathyLocationManager *self,
guint connection_status = -1;
gboolean can_publish;
EmpathyConf *conf = empathy_conf_get ();
- EmpathyTpContactFactory *factory;
if (!conn)
return;
@@ -215,9 +223,8 @@ publish_location (EmpathyLocationManager *self,
(g_hash_table_size (priv->location) == 0 ? "empty" : ""),
conn);
- factory = empathy_tp_contact_factory_dup_singleton (conn);
- empathy_tp_contact_factory_set_location (factory, priv->location);
- g_object_unref (factory);
+ tp_cli_connection_interface_location_call_set_location (conn, -1,
+ priv->location, publish_location_cb, NULL, NULL, G_OBJECT (self));
}
typedef struct