aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-04-24 05:46:56 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-04-24 05:46:56 +0800
commitd6d875d02faf911e1b4ddb1cfe9b1eb44b009b95 (patch)
treebe026289d1790ab433f21e186e70623fdc595342 /calendar/gui
parentf3c50eda59d942218062edd901e9b5ba601a526a (diff)
downloadgsoc2013-evolution-d6d875d02faf911e1b4ddb1cfe9b1eb44b009b95.tar.gz
gsoc2013-evolution-d6d875d02faf911e1b4ddb1cfe9b1eb44b009b95.tar.zst
gsoc2013-evolution-d6d875d02faf911e1b4ddb1cfe9b1eb44b009b95.zip
Fixes #41671
2003-04-23 Rodrigo Moya <rodrigo@ximian.com> 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
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c5
-rw-r--r--calendar/gui/alarm-notify/notify-main.c4
2 files changed, 6 insertions, 3 deletions
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 <glib.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-init.h>
+#include <libgnome/gnome-sound.h>
#include <libgnomeui/gnome-client.h>
#include <libgnomevfs/gnome-vfs-init.h>
#include <glade/glade.h>
@@ -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;