diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-23 22:01:54 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-28 14:36:33 +0800 |
commit | 3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf (patch) | |
tree | 7971bcacf879c536c528e0dd2d4985f0f8580bad /src/empathy-event-manager.c | |
parent | 36f079ca48db4727b237ea471f13f7593c8e1b71 (diff) | |
download | gsoc2013-empathy-3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf.tar gsoc2013-empathy-3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf.tar.gz gsoc2013-empathy-3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf.tar.bz2 gsoc2013-empathy-3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf.tar.lz gsoc2013-empathy-3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf.tar.xz gsoc2013-empathy-3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf.tar.zst gsoc2013-empathy-3faa1f894ae25830ba4fbdf4d8d7f016f28cbcdf.zip |
event-manager: only display incoming messages in notification
If not, we display outgoing ones as well if the user uses Shell's message tray
to reply.
Diffstat (limited to 'src/empathy-event-manager.c')
-rw-r--r-- | src/empathy-event-manager.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index 599a6a48e..799e91abc 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -562,7 +562,7 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat, EmpathyMessage *message, EventManagerApproval *approval) { - GtkWidget *window = empathy_main_window_dup (); + GtkWidget *window; EmpathyContact *sender; const gchar *header; const gchar *msg; @@ -575,6 +575,11 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat, event = event_lookup_by_approval (approval->manager, approval); sender = empathy_message_get_sender (message); + + /* We only want to show incoming messages */ + if (empathy_contact_is_user (sender)) + return; + header = empathy_contact_get_alias (sender); msg = empathy_message_get_body (message); @@ -588,6 +593,8 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat, EMPATHY_EVENT_TYPE_CHAT, EMPATHY_IMAGE_NEW_MESSAGE, header, msg, approval, event_text_channel_process_func, NULL); + window = empathy_main_window_dup (); + empathy_sound_manager_play (priv->sound_mgr, window, EMPATHY_SOUND_CONVERSATION_NEW); |