aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-02-24 00:49:26 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-02-24 00:49:26 +0800
commitcecc20a75406a29bd439d068ba56bd26a86c496b (patch)
tree9de37b0228f14c1c1ba20d3d667d82d30f4216a6
parent50c9020cfe7924fcb9bb69599ecede1f396e9bbd (diff)
downloadgsoc2013-empathy-cecc20a75406a29bd439d068ba56bd26a86c496b.tar
gsoc2013-empathy-cecc20a75406a29bd439d068ba56bd26a86c496b.tar.gz
gsoc2013-empathy-cecc20a75406a29bd439d068ba56bd26a86c496b.tar.bz2
gsoc2013-empathy-cecc20a75406a29bd439d068ba56bd26a86c496b.tar.lz
gsoc2013-empathy-cecc20a75406a29bd439d068ba56bd26a86c496b.tar.xz
gsoc2013-empathy-cecc20a75406a29bd439d068ba56bd26a86c496b.tar.zst
gsoc2013-empathy-cecc20a75406a29bd439d068ba56bd26a86c496b.zip
Retrieve the contact for incoming calls so we can display it
-rw-r--r--src/empathy-event-manager.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index b52729643..d8cddaf73 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -662,14 +662,29 @@ cdo_invalidated_cb (TpProxy *cdo,
}
static void
-event_manager_call_channel_got_contact (EventManagerApproval *approval)
+event_manager_call_channel_got_contact_cb (TpConnection *connection,
+ EmpathyContact *contact,
+ const GError *error,
+ gpointer user_data,
+ GObject *object)
{
+ EventManagerApproval *approval = (EventManagerApproval *) user_data;
EmpathyEventManagerPriv *priv = GET_PRIV (approval->manager);
- GtkWidget *window = empathy_main_window_dup ();
+ GtkWidget *window;
TpyCallChannel *call;
gchar *header;
gboolean video;
+ if (error != NULL)
+ {
+ DEBUG ("Can't get the contact for the call.. Rejecting?");
+ reject_approval (approval);
+ return;
+ }
+
+ window = empathy_main_window_dup ();
+ approval->contact = g_object_ref (contact);
+
call = TPY_CALL_CHANNEL (approval->handler_instance);
g_object_get (G_OBJECT (call), "initial-video", &video, NULL);
@@ -1044,9 +1059,15 @@ approve_channels (TpSimpleApprover *approver,
else if (channel_type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL)
{
TpyCallChannel *call = TPY_CALL_CHANNEL (channel);
+ const gchar *id;
approval->handler_instance = G_OBJECT (call);
- event_manager_call_channel_got_contact (approval);
+
+ id = tp_channel_get_identifier (channel);
+
+ empathy_tp_contact_factory_get_from_id (connection, id,
+ event_manager_call_channel_got_contact_cb,
+ approval, NULL, G_OBJECT (self));
}
else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
{