From d6d875d02faf911e1b4ddb1cfe9b1eb44b009b95 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 23 Apr 2003 21:46:56 +0000 Subject: Fixes #41671 2003-04-23 Rodrigo Moya Fixes #41671 * gui/alarm-notify/notify-main.c (main): added calls to gnome_sound_init and gnome_sound_shutdown. * gui/alarm-notify/alarm-queue.c (audio_notification): check that the sound file exists, and gdk_beep if not. svn path=/trunk/; revision=20946 --- calendar/ChangeLog | 10 ++++++++++ calendar/gui/alarm-notify/alarm-queue.c | 5 ++--- calendar/gui/alarm-notify/notify-main.c | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8b72e13da6..83e82aabfc 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2003-04-23 Rodrigo Moya + + Fixes #41671 + + * gui/alarm-notify/notify-main.c (main): added calls to gnome_sound_init + and gnome_sound_shutdown. + + * gui/alarm-notify/alarm-queue.c (audio_notification): check that the + sound file exists, and gdk_beep if not. + 2003-04-22 Rodrigo Moya Fixes part of #41148, #41216 and #41235 diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index d6fda7d37c..d1bc64b5d0 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -826,10 +826,9 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa, url = icalattach_get_url (attach); - if (url && *url) { - gnome_sound_init ("localhost"); + if (url && *url && g_file_test (url, G_FILE_TEXT_EXISTS)) gnome_sound_play (url); /* this sucks */ - } else + else gdk_beep (); } diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index c8611af626..31541204e3 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -174,6 +175,8 @@ main (int argc, char **argv) glade_init (); + gnome_sound_init ("localhost"); + factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory", (BonoboFactoryCallback) alarm_notify_factory_fn, NULL); if (!factory) @@ -193,6 +196,7 @@ main (int argc, char **argv) alarm_queue_done (); alarm_done (); + gnome_sound_shutdown (); gnome_vfs_shutdown (); return 0; -- cgit v1.2.3