From 6924c640f01c5ca55d1001ddc5c44a46d7baf948 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 12 Jan 2011 13:09:28 +0100 Subject: chat-window: don't play sound for pending messages (#639302) They have already be notified by the Approver. --- src/empathy-chat-window.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 5cb7ec494..2cf4e73f5 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -1454,13 +1454,14 @@ chat_window_new_message_cb (EmpathyChat *chat, chat_window_set_highlight_room_labels (chat); } - empathy_sound_manager_play (priv->sound_mgr, GTK_WIDGET (priv->dialog), - EMPATHY_SOUND_MESSAGE_INCOMING); + /* Pending messages have already been displayed and notified in the + * approver, so we don't display a notification and play a sound for those */ + if (!pending) { + empathy_sound_manager_play (priv->sound_mgr, GTK_WIDGET (priv->dialog), + EMPATHY_SOUND_MESSAGE_INCOMING); - /* Pending messages have already been displayed in the approver, so we don't - * display a notification for those. */ - if (!pending) chat_window_show_or_update_notification (window, message, chat); + } } /* update the number of unread messages and the window icon */ -- cgit v1.2.3