[empathy] call-handler: get the contact from the TpCall if it has not been defined during construction
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] call-handler: get the contact from the TpCall if it has not been defined during construction
- Date: Wed, 29 Apr 2009 06:56:28 -0400 (EDT)
commit c437b1ed8795f9db28d24719c856a462d764fdcc
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Apr 28 16:15:05 2009 +0100
call-handler: get the contact from the TpCall if it has not been defined during construction
---
libempathy/empathy-call-handler.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index 6f7ed8b..bccbeae 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]