aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-30 18:24:20 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-30 18:24:20 +0800
commit81068bbf3ebd6c251f308d6d45e4dadf07432ea7 (patch)
treed17b2afe895a95156d753b6ccbb4b66196cb01b9 /src/empathy-call-window.c
parent8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b (diff)
downloadgsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar
gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.gz
gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.bz2
gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.lz
gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.xz
gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.zst
gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.zip
move sound functions to EmpathySoundManager methods
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 4d2d99c27..6a0c24aad 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -221,6 +221,8 @@ struct _EmpathyCallWindowPriv
gboolean start_call_when_playing;
/* TRUE if we requested to set the pipeline in the playing state */
gboolean pipeline_playing;
+
+ EmpathySoundManager *sound_mgr;
};
#define GET_PRIV(o) \
@@ -810,7 +812,7 @@ empathy_call_window_set_state_connecting (EmpathyCallWindow *window)
priv->call_state = CONNECTING;
if (priv->outgoing)
- empathy_sound_start_playing (GTK_WIDGET (window),
+ empathy_sound_manager_start_playing (priv->sound_mgr, GTK_WIDGET (window),
EMPATHY_SOUND_PHONE_OUTGOING, MS_BETWEEN_RING);
}
@@ -1225,6 +1227,8 @@ empathy_call_window_init (EmpathyCallWindow *self)
g_object_ref (priv->ui_manager);
g_object_unref (gui);
+ priv->sound_mgr = empathy_sound_manager_dup_singleton ();
+
empathy_geometry_bind (GTK_WINDOW (self), "call-window");
}
@@ -1761,6 +1765,8 @@ empathy_call_window_dispose (GObject *object)
priv->contact = NULL;
}
+ tp_clear_object (&priv->sound_mgr);
+
/* release any references held by the object here */
if (G_OBJECT_CLASS (empathy_call_window_parent_class)->dispose)
G_OBJECT_CLASS (empathy_call_window_parent_class)->dispose (object);
@@ -1913,7 +1919,8 @@ empathy_call_window_disconnected (EmpathyCallWindow *self,
could_reset_pipeline = empathy_call_window_reset_pipeline (self);
if (priv->call_state == CONNECTING)
- empathy_sound_stop (EMPATHY_SOUND_PHONE_OUTGOING);
+ empathy_sound_manager_stop (priv->sound_mgr,
+ EMPATHY_SOUND_PHONE_OUTGOING);
if (priv->call_state != REDIALING)
priv->call_state = DISCONNECTED;
@@ -2456,7 +2463,7 @@ empathy_call_window_connected (gpointer user_data)
EmpathyTpCall *call;
gboolean can_send_video;
- empathy_sound_stop (EMPATHY_SOUND_PHONE_OUTGOING);
+ empathy_sound_manager_stop (priv->sound_mgr, EMPATHY_SOUND_PHONE_OUTGOING);
can_send_video = priv->video_input != NULL && priv->contact != NULL &&
empathy_contact_can_voip_video (priv->contact);
@@ -2884,7 +2891,7 @@ empathy_call_window_delete_cb (GtkWidget *widget, GdkEvent*event,
}
if (priv->call_state == CONNECTING)
- empathy_sound_stop (EMPATHY_SOUND_PHONE_OUTGOING);
+ empathy_sound_manager_stop (priv->sound_mgr, EMPATHY_SOUND_PHONE_OUTGOING);
return FALSE;
}