aboutsummaryrefslogtreecommitdiffstats
path: root/megaphone/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-03-04 18:41:28 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-04-22 18:21:13 +0800
commit9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5 (patch)
tree78925c31878880bc82163cb02e9e38e7fe0679cf /megaphone/src
parentdcd115814f40de200c3cf4da6693de84489592ac (diff)
downloadgsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.gz
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.bz2
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.lz
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.xz
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.zst
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.zip
Change EmpathyTpContactFactory API to look more like TpConnection. Add function to get only one contact from
id/handle.
Diffstat (limited to 'megaphone/src')
-rw-r--r--megaphone/src/megaphone-applet.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c
index 48b5a1859..b58255fc2 100644
--- a/megaphone/src/megaphone-applet.c
+++ b/megaphone/src/megaphone-applet.c
@@ -172,13 +172,19 @@ megaphone_applet_update_contact (MegaphoneApplet *applet)
static void
megaphone_applet_got_contact_cb (EmpathyTpContactFactory *factory,
- GList *contacts,
+ EmpathyContact *contact,
+ const GError *error,
gpointer user_data,
GObject *applet)
{
MegaphoneAppletPriv *priv = GET_PRIV (applet);
- priv->contact = g_object_ref (contacts->data);
+ if (error != NULL) {
+ DEBUG ("Error: %s", error->message);
+ return;
+ }
+
+ priv->contact = g_object_ref (contact);
g_signal_connect_swapped (priv->contact, "notify",
G_CALLBACK (megaphone_applet_update_contact),
applet);
@@ -192,14 +198,13 @@ megaphone_applet_new_connection_cb (EmpathyAccountManager *manager,
MegaphoneApplet *applet)
{
MegaphoneAppletPriv *priv = GET_PRIV (applet);
- const gchar *id = priv->id;
if (priv->contact || !empathy_account_equal (account, priv->account)) {
return;
}
priv->factory = empathy_tp_contact_factory_dup_singleton (connection);
- empathy_tp_contact_factory_get_from_ids (priv->factory, 1, &id,
+ empathy_tp_contact_factory_get_from_id (priv->factory, priv->id,
megaphone_applet_got_contact_cb,
NULL, NULL, G_OBJECT (applet));
}