aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:46:01 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:46:01 +0800
commit6ef34909df59304871330b9311430eb4116873a5 (patch)
treef314e755a77fb598c2f5b635ebc5f1a1ba0b9dd6 /src/empathy-main-window.c
parent7e38c381cd6e647e20b703973c9ed2c14f6ab543 (diff)
downloadgsoc2013-empathy-6ef34909df59304871330b9311430eb4116873a5.tar
gsoc2013-empathy-6ef34909df59304871330b9311430eb4116873a5.tar.gz
gsoc2013-empathy-6ef34909df59304871330b9311430eb4116873a5.tar.bz2
gsoc2013-empathy-6ef34909df59304871330b9311430eb4116873a5.tar.lz
gsoc2013-empathy-6ef34909df59304871330b9311430eb4116873a5.tar.xz
gsoc2013-empathy-6ef34909df59304871330b9311430eb4116873a5.tar.zst
gsoc2013-empathy-6ef34909df59304871330b9311430eb4116873a5.zip
Adapt the libcanberra calls to use the new functions.
svn path=/trunk/; revision=2025
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 5c82fe599..ced1d68e3 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -286,11 +286,12 @@ main_window_flash_cb (EmpathyMainWindow *window)
static void
main_window_flash_start (EmpathyMainWindow *window)
{
- ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0,
- CA_PROP_EVENT_ID, "message-new-instant",
- CA_PROP_EVENT_DESCRIPTION, _("Incoming chat request"),
- CA_PROP_APPLICATION_NAME, g_get_application_name (),
- NULL);
+ if (empathy_sound_pref_is_enabled (EMPATHY_PREFS_SOUNDS_NEW_CONVERSATION)) {
+ ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0,
+ CA_PROP_EVENT_ID, "message-new-instant",
+ CA_PROP_EVENT_DESCRIPTION, _("Incoming chat request"),
+ NULL);
+ }
if (window->flash_timeout_id != 0) {
return;
@@ -1172,22 +1173,24 @@ main_window_status_changed_cb (MissionControl *mc,
main_window_error_display (window, account, message);
}
- if (status == TP_CONNECTION_STATUS_DISCONNECTED) {
+ if (status == TP_CONNECTION_STATUS_DISCONNECTED &&
+ empathy_sound_pref_is_enabled (EMPATHY_PREFS_SOUNDS_SERVICE_LOGOUT)) {
ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0,
CA_PROP_EVENT_ID, "service-logout",
CA_PROP_EVENT_DESCRIPTION, _("Disconnected from server"),
- CA_PROP_APPLICATION_NAME, g_get_application_name (),
NULL);
}
if (status == TP_CONNECTION_STATUS_CONNECTED) {
GtkWidget *error_widget;
- ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0,
- CA_PROP_EVENT_ID, "service-login",
- CA_PROP_EVENT_DESCRIPTION, _("Connected to server"),
- CA_PROP_APPLICATION_NAME, g_get_application_name (),
- NULL);
+ if (empathy_sound_pref_is_enabled (EMPATHY_PREFS_SOUNDS_SERVICE_LOGIN)) {
+ ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0,
+ CA_PROP_EVENT_ID, "service-login",
+ CA_PROP_EVENT_DESCRIPTION, _("Connected to server"),
+ NULL);
+ }
+
/* Account connected without error, remove error message if any */
error_widget = g_hash_table_lookup (window->errors, account);
if (error_widget) {