aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-queue.c
diff options
context:
space:
mode:
authorH.Habighorst <tearofadragon@googlemail.com>2009-08-23 20:31:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-23 20:31:14 +0800
commitff7084ffe4a935a4cfafc9cd44a9b9daf43cb976 (patch)
tree12165a7c8893a318994897c4899f68c653c11882 /calendar/gui/alarm-notify/alarm-queue.c
parent8443ed41e32438e22e862d5645117cfdb2f03cc9 (diff)
downloadgsoc2013-evolution-ff7084ffe4a935a4cfafc9cd44a9b9daf43cb976.tar
gsoc2013-evolution-ff7084ffe4a935a4cfafc9cd44a9b9daf43cb976.tar.gz
gsoc2013-evolution-ff7084ffe4a935a4cfafc9cd44a9b9daf43cb976.tar.bz2
gsoc2013-evolution-ff7084ffe4a935a4cfafc9cd44a9b9daf43cb976.tar.lz
gsoc2013-evolution-ff7084ffe4a935a4cfafc9cd44a9b9daf43cb976.tar.xz
gsoc2013-evolution-ff7084ffe4a935a4cfafc9cd44a9b9daf43cb976.tar.zst
gsoc2013-evolution-ff7084ffe4a935a4cfafc9cd44a9b9daf43cb976.zip
Bug 571488 - Migrate from deprecated gnome_sound to libcanberra
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-queue.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 1aaca186ca..8d272764bd 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -34,7 +34,7 @@
#include <bonobo/bonobo-main.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <libgnome/gnome-sound.h>
+#include <canberra-gtk.h>
#include <libecal/e-cal-time-util.h>
#include <libecal/e-cal-component.h>
@@ -1641,13 +1641,23 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa,
if (attach && icalattach_get_is_url (attach)) {
const gchar *url;
+ gchar *filename;
+ GError *error = NULL;
url = icalattach_get_url (attach);
+ filename = g_filename_from_uri (url, NULL, &error);
- if (url && *url && g_file_test (url, G_FILE_TEST_EXISTS)) {
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ } else if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
flag = 1;
- gnome_sound_play (url); /* this sucks */
+ ca_context_play (
+ ca_gtk_context_get(), 0,
+ CA_PROP_MEDIA_FILENAME, filename, NULL);
}
+
+ g_free (filename);
}
if (!flag)