aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-queue.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:37:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:40:49 +0800
commitcfb9c32b6657165e4d5e11aa7b47804f679a61f8 (patch)
tree1f9c8954df7a357b5dc20a13ac82bf31c1112083 /calendar/gui/alarm-notify/alarm-queue.c
parentfefeb30f58447f2fa7bcbee16dbe68a9333ce89d (diff)
parent0f7f4cfe38b3c4cd83efbe9922ae15c5aee00317 (diff)
downloadgsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.gz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.bz2
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.lz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.xz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.zst
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.zip
Merge commit 'origin/kill-bonobo'
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-queue.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c19
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)