aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-02-24 00:49:26 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 17:20:06 +0800
commit69f9dbdb487ac77e506aca37706141fbcccffccf (patch)
tree3f12b3d51e2e2351f8b268c4deedaa42581d783b
parent0d3fa03b5a9b8d2d9737c8f39aada70669fde194 (diff)
downloadgsoc2013-empathy-69f9dbdb487ac77e506aca37706141fbcccffccf.tar
gsoc2013-empathy-69f9dbdb487ac77e506aca37706141fbcccffccf.tar.gz
gsoc2013-empathy-69f9dbdb487ac77e506aca37706141fbcccffccf.tar.bz2
gsoc2013-empathy-69f9dbdb487ac77e506aca37706141fbcccffccf.tar.lz
gsoc2013-empathy-69f9dbdb487ac77e506aca37706141fbcccffccf.tar.xz
gsoc2013-empathy-69f9dbdb487ac77e506aca37706141fbcccffccf.tar.zst
gsoc2013-empathy-69f9dbdb487ac77e506aca37706141fbcccffccf.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 32b805423..4e156cca7 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -674,14 +674,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);
@@ -1064,9 +1079,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)
{