[gnome-power-manager] Add a trivial debug output when the sound fails to be played
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Add a trivial debug output when the sound fails to be played
- Date: Wed, 29 Jul 2009 10:22:57 +0000 (UTC)
commit 7a7a9251971e3991a7f2fbaed8ec56957bf15af0
Author: Richard Hughes <richard hughsie com>
Date: Wed Jul 29 11:16:55 2009 +0100
Add a trivial debug output when the sound fails to be played
src/gpm-manager.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 8efe88e..34bbc96 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -158,6 +158,7 @@ gpm_manager_play (GpmManager *manager, GpmManagerSound action, gboolean force)
const gchar *id = NULL;
const gchar *desc = NULL;
gboolean ret;
+ gint retval;
ret = gconf_client_get_bool (manager->priv->conf, GPM_CONF_UI_ENABLE_SOUND, NULL);
if (!ret && !force) {
@@ -214,9 +215,11 @@ gpm_manager_play (GpmManager *manager, GpmManagerSound action, gboolean force)
}
/* play the sound, using sounds from the naming spec */
- ca_context_play (ca_gtk_context_get (), 0,
- CA_PROP_EVENT_ID, id,
- CA_PROP_EVENT_DESCRIPTION, desc, NULL);
+ retval = ca_context_play (ca_gtk_context_get (), 0,
+ CA_PROP_EVENT_ID, id,
+ CA_PROP_EVENT_DESCRIPTION, desc, NULL);
+ if (retval < 0)
+ egg_warning ("failed to play %s: %s", id, ca_strerror (retval));
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]