From 2f9a520747ceacc89e5d6d923ed0cda8da22b95c Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Fri, 3 Jun 2011 11:30:07 +0100 Subject: CallWindow: correctly detect outgoing calls --- src/empathy-call-window.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index ccec9f628..05f63e2f6 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -1993,13 +1993,14 @@ empathy_call_window_constructed (GObject *object) EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (object); EmpathyCallWindowPriv *priv = GET_PRIV (self); TpyCallChannel *call; + TpyCallState state; g_assert (priv->handler != NULL); g_object_get (priv->handler, "call-channel", &call, NULL); - priv->outgoing = (call == NULL); - if (call != NULL) - g_object_unref (call); + state = tpy_call_channel_get_state (call, NULL, NULL); + priv->outgoing = (state == TPY_CALL_STATE_PENDING_INITIATOR); + tp_clear_object (&call); g_object_get (priv->handler, "target-contact", &priv->contact, NULL); g_assert (priv->contact != NULL); -- cgit v1.2.3