aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-01-12 20:09:28 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-01-24 22:40:05 +0800
commit6924c640f01c5ca55d1001ddc5c44a46d7baf948 (patch)
tree84a426abfd01bd1e1c25ea183059fa5330a37c16 /src
parentf8d4856794d8bf6ba951586fe2e196a00743c764 (diff)
downloadgsoc2013-empathy-6924c640f01c5ca55d1001ddc5c44a46d7baf948.tar
gsoc2013-empathy-6924c640f01c5ca55d1001ddc5c44a46d7baf948.tar.gz
gsoc2013-empathy-6924c640f01c5ca55d1001ddc5c44a46d7baf948.tar.bz2
gsoc2013-empathy-6924c640f01c5ca55d1001ddc5c44a46d7baf948.tar.lz
gsoc2013-empathy-6924c640f01c5ca55d1001ddc5c44a46d7baf948.tar.xz
gsoc2013-empathy-6924c640f01c5ca55d1001ddc5c44a46d7baf948.tar.zst
gsoc2013-empathy-6924c640f01c5ca55d1001ddc5c44a46d7baf948.zip
chat-window: don't play sound for pending messages (#639302)
They have already be notified by the Approver.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c11
1 files changed, 6 insertions, 5 deletions
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 */