aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-04-28 23:15:05 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-04-29 17:24:11 +0800
commitc437b1ed8795f9db28d24719c856a462d764fdcc (patch)
treeb03f64498de9f2dff070e6a25a9e00e64b4ffb3e
parent08a5b021e98d8e943cdeb2e73de394e41f52b46c (diff)
downloadgsoc2013-empathy-c437b1ed8795f9db28d24719c856a462d764fdcc.tar
gsoc2013-empathy-c437b1ed8795f9db28d24719c856a462d764fdcc.tar.gz
gsoc2013-empathy-c437b1ed8795f9db28d24719c856a462d764fdcc.tar.bz2
gsoc2013-empathy-c437b1ed8795f9db28d24719c856a462d764fdcc.tar.lz
gsoc2013-empathy-c437b1ed8795f9db28d24719c856a462d764fdcc.tar.xz
gsoc2013-empathy-c437b1ed8795f9db28d24719c856a462d764fdcc.tar.zst
gsoc2013-empathy-c437b1ed8795f9db28d24719c856a462d764fdcc.zip
call-handler: get the contact from the TpCall if it has not been defined during construction
-rw-r--r--libempathy/empathy-call-handler.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index 6f7ed8b04..bccbeaea2 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -30,6 +30,7 @@
#include "empathy-call-handler.h"
#include "empathy-dispatcher.h"
#include "empathy-marshal.h"
+#include "empathy-tp-contact-factory.h"
#include "empathy-utils.h"
G_DEFINE_TYPE(EmpathyCallHandler, empathy_call_handler, G_TYPE_OBJECT)
@@ -114,6 +115,17 @@ empathy_call_handler_init (EmpathyCallHandler *obj)
}
static void
+empathy_call_handler_constructed (GObject *object)
+{
+ EmpathyCallHandlerPriv *priv = GET_PRIV (object);
+
+ if (priv->contact == NULL)
+ {
+ g_object_get (priv->call, "contact", &(priv->contact), NULL);
+ }
+}
+
+static void
empathy_call_handler_set_property (GObject *object,
guint property_id, const GValue *value, GParamSpec *pspec)
{
@@ -160,6 +172,7 @@ empathy_call_handler_class_init (EmpathyCallHandlerClass *klass)
g_type_class_add_private (klass, sizeof (EmpathyCallHandlerPriv));
+ object_class->constructed = empathy_call_handler_constructed;
object_class->set_property = empathy_call_handler_set_property;
object_class->get_property = empathy_call_handler_get_property;
object_class->dispose = empathy_call_handler_dispose;