[empathy: 3/4] CallWindow: correctly detect outgoing calls
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 3/4] CallWindow: correctly detect outgoing calls
- Date: Fri, 14 Oct 2011 04:29:43 +0000 (UTC)
commit 2f9a520747ceacc89e5d6d923ed0cda8da22b95c
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Fri Jun 3 11:30:07 2011 +0100
CallWindow: correctly detect outgoing calls
src/empathy-call-window.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index ccec9f6..05f63e2 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]