aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-03 18:30:07 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-09-05 22:20:50 +0800
commit2f9a520747ceacc89e5d6d923ed0cda8da22b95c (patch)
treef6994a1b13630fff289b53ed6bfe661a88f38640
parentc6e11eb4767148a799ab565de508886ffa7fa86f (diff)
downloadgsoc2013-empathy-2f9a520747ceacc89e5d6d923ed0cda8da22b95c.tar
gsoc2013-empathy-2f9a520747ceacc89e5d6d923ed0cda8da22b95c.tar.gz
gsoc2013-empathy-2f9a520747ceacc89e5d6d923ed0cda8da22b95c.tar.bz2
gsoc2013-empathy-2f9a520747ceacc89e5d6d923ed0cda8da22b95c.tar.lz
gsoc2013-empathy-2f9a520747ceacc89e5d6d923ed0cda8da22b95c.tar.xz
gsoc2013-empathy-2f9a520747ceacc89e5d6d923ed0cda8da22b95c.tar.zst
gsoc2013-empathy-2f9a520747ceacc89e5d6d923ed0cda8da22b95c.zip
CallWindow: correctly detect outgoing calls
-rw-r--r--src/empathy-call-window.c7
1 files 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);