diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-call-window.c | 23 | ||||
-rw-r--r-- | src/empathy-chat-window.c | 6 | ||||
-rw-r--r-- | src/empathy-main-window.c | 15 |
3 files changed, 15 insertions, 29 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 4c6777d62..324f37c1e 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -25,7 +25,6 @@ #include <glade/glade.h> #include <glib/gi18n.h> -#include <canberra-gtk.h> #include <telepathy-glib/enums.h> @@ -195,10 +194,9 @@ static void call_window_hang_up_button_clicked_cb (GtkWidget *widget, EmpathyCallWindow *window) { - ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0, - CA_PROP_EVENT_ID, "phone-hangup", - CA_PROP_EVENT_DESCRIPTION, _("Voice call ended"), - NULL); + empathy_sound_play (GTK_WIDGET (window->window), + EMPATHY_SOUND_PHONE_HANGUP); + DEBUG ("Call clicked, end call"); call_window_finalize (window); } @@ -403,19 +401,14 @@ call_window_update (EmpathyCallWindow *window) if (is_incoming) { call_window_show_confirmation_dialog (window); - ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0, - CA_PROP_EVENT_ID, "phone-incoming-call", - CA_PROP_EVENT_DESCRIPTION, _("Incoming voice call"), - NULL); + empathy_sound_play (GTK_WIDGET (window->window), + EMPATHY_SOUND_PHONE_INCOMING); } else { - ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0, - CA_PROP_EVENT_ID, "phone-outgoing-calling", - CA_PROP_EVENT_DESCRIPTION, _("Outgoing voice call"), - NULL); - } - + empathy_sound_play (GTK_WIDGET (window->window), + EMPATHY_SOUND_PHONE_OUTGOING); + } } else if (window->status == EMPATHY_TP_CALL_STATUS_ACCEPTED) { diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 2c97301a5..c6b23b68d 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -858,13 +858,11 @@ chat_window_new_message_cb (EmpathyChat *chat, if (empathy_contact_is_user (sender) != FALSE) { empathy_sound_play (GTK_WIDGET (priv->dialog), - EMPATHY_PREFS_SOUNDS_OUTGOING_MESSAGE, - "message-sent-instant", _("Sent an instant message")); + EMPATHY_SOUND_MESSAGE_OUTGOING); } else { 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")); + EMPATHY_SOUND_MESSAGE_INCOMING); } } diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 07f4b9f7d..f034638e3 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -284,8 +284,7 @@ static void main_window_flash_start (EmpathyMainWindow *window) { empathy_sound_play (GTK_WIDGET (window->window), - EMPATHY_PREFS_SOUNDS_NEW_CONVERSATION, - "message-new-instant", _("Incoming chat request")); + EMPATHY_SOUND_CONVERSATION_NEW); if (window->flash_timeout_id != 0) { return; @@ -431,16 +430,14 @@ main_window_connection_changed_cb (EmpathyAccountManager *manager, if (current == TP_CONNECTION_STATUS_DISCONNECTED) { empathy_sound_play (GTK_WIDGET (window->window), - EMPATHY_PREFS_SOUNDS_SERVICE_LOGOUT, - "service-logout", _("Disconnected from server")); + EMPATHY_SOUND_ACCOUNT_DISCONNECTED); } if (current == TP_CONNECTION_STATUS_CONNECTED) { GtkWidget *error_widget; empathy_sound_play (GTK_WIDGET (window->window), - EMPATHY_PREFS_SOUNDS_SERVICE_LOGIN, - "service-login", _("Connected to server")); + EMPATHY_SOUND_ACCOUNT_CONNECTED); /* Account connected without error, remove error message if any */ error_widget = g_hash_table_lookup (window->errors, account); @@ -471,16 +468,14 @@ main_window_contact_presence_changed_cb (EmpathyContactMonitor *monitor, if (previous < MC_PRESENCE_AVAILABLE && current > MC_PRESENCE_OFFLINE) { /* someone is logging in */ empathy_sound_play (GTK_WIDGET (window->window), - EMPATHY_PREFS_SOUNDS_CONTACT_LOGIN, - "service-login", _("Contact connected")); + EMPATHY_SOUND_CONTACT_CONNECTED); return; } if (previous > MC_PRESENCE_OFFLINE && current < MC_PRESENCE_AVAILABLE) { /* someone is logging off */ empathy_sound_play (GTK_WIDGET (window->window), - EMPATHY_PREFS_SOUNDS_CONTACT_LOGOUT, - "service-logout", _("Contact disconnected")); + EMPATHY_SOUND_CONTACT_DISCONNECTED); } } |