diff options
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-queue.c')
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 99e9a4f8e5..ef6e77d386 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> @@ -50,7 +50,6 @@ #include "alarm-notify.h" #include "config-data.h" #include "util.h" -#include "e-util/e-popup.h" #include "e-util/e-error.h" #define d(x) @@ -896,6 +895,7 @@ create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, gint snooze_mins) static void edit_component (ECal *client, ECalComponent *comp) { +#if 0 /* KILL-BONOBO */ const gchar *uid; const gchar *uri; ECalSourceType source_type; @@ -939,6 +939,7 @@ edit_component (ECal *client, ECalComponent *comp) /* Get rid of the factory */ bonobo_object_release_unref (factory, NULL); +#endif } typedef struct { @@ -1640,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) |