aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-chat-window.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:48:49 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:48:49 +0800
commit65f7803dd86bdb99814cbabda7dfb9e9116d86f1 (patch)
tree98290f786ba1bbfbf183e663051b5c4002163f87 /src/empathy-chat-window.c
parentaef8f7c5f413cd7830d01476be8d36c2f485a828 (diff)
downloadgsoc2013-empathy-65f7803dd86bdb99814cbabda7dfb9e9116d86f1.tar
gsoc2013-empathy-65f7803dd86bdb99814cbabda7dfb9e9116d86f1.tar.gz
gsoc2013-empathy-65f7803dd86bdb99814cbabda7dfb9e9116d86f1.tar.bz2
gsoc2013-empathy-65f7803dd86bdb99814cbabda7dfb9e9116d86f1.tar.lz
gsoc2013-empathy-65f7803dd86bdb99814cbabda7dfb9e9116d86f1.tar.xz
gsoc2013-empathy-65f7803dd86bdb99814cbabda7dfb9e9116d86f1.tar.zst
gsoc2013-empathy-65f7803dd86bdb99814cbabda7dfb9e9116d86f1.zip
Turn empathy_sound_pref_is_enabled into empathy_sound_play that
automatically plays the sound if the pref is enabled. svn path=/trunk/; revision=2078
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r--src/empathy-chat-window.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index e1bd9075e..2c97301a5 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -33,7 +33,6 @@
#include <gdk/gdkkeysyms.h>
#include <glade/glade.h>
#include <glib/gi18n.h>
-#include <canberra-gtk.h>
#include <telepathy-glib/util.h>
#include <libmissioncontrol/mission-control.h>
@@ -858,19 +857,14 @@ chat_window_new_message_cb (EmpathyChat *chat,
sender = empathy_message_get_sender (message);
if (empathy_contact_is_user (sender) != FALSE) {
- if (empathy_sound_pref_is_enabled (EMPATHY_PREFS_SOUNDS_OUTGOING_MESSAGE)) {
- ca_gtk_play_for_widget (GTK_WIDGET (priv->dialog), 0,
- CA_PROP_EVENT_ID, "message-sent-instant",
- CA_PROP_EVENT_DESCRIPTION, _("Sent an instant message"),
- NULL);
- }
+ empathy_sound_play (GTK_WIDGET (priv->dialog),
+ EMPATHY_PREFS_SOUNDS_OUTGOING_MESSAGE,
+ "message-sent-instant", _("Sent an instant message"));
} else {
- if ((!has_focus || priv->current_chat != chat) &&
- empathy_sound_pref_is_enabled (EMPATHY_PREFS_SOUNDS_INCOMING_MESSAGE)) {
- ca_gtk_play_for_widget (GTK_WIDGET (priv->dialog), 0,
- CA_PROP_EVENT_ID, "message-new-instant",
- CA_PROP_EVENT_DESCRIPTION, _("Received an instant message"),
- NULL);
+ if ((!has_focus || priv->current_chat != chat)) {
+ empathy_sound_play (GTK_WIDGET (priv->dialog),
+ EMPATHY_PREFS_SOUNDS_INCOMING_MESSAGE,
+ "message-new-instant", _("Received an instant message"));
}
}