From e357c59b3b07fe144e56078562df1737374d2b7c Mon Sep 17 00:00:00 2001 From: Alfred Peng Date: Tue, 23 Mar 2004 09:38:27 +0000 Subject: get the mail alarm description message from "malarm_description" instead 2004-03-23 Alfred Peng * gui/dialogs/alarm-options.c (malarm_widgets_to_alarm): get the mail alarm description message from "malarm_description" instead of "dalarm_description". 2004-03-23 Alfred Peng * gui/alarm-notify/alarm-queue.c (audio_notification): If there is no attachment for a audio reminder, only a message window shows up. Get a beep sound even without attachment for audio reminder. svn path=/trunk/; revision=25154 --- calendar/ChangeLog | 13 +++++++++++++ calendar/gui/alarm-notify/alarm-queue.c | 10 +++++++--- calendar/gui/dialogs/alarm-options.c | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8617b81af6..6500bf5396 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,16 @@ +2004-03-23 Alfred Peng + + * gui/dialogs/alarm-options.c (malarm_widgets_to_alarm): get + the mail alarm description message from "malarm_description" + instead of "dalarm_description". + +2004-03-23 Alfred Peng + + * gui/alarm-notify/alarm-queue.c (audio_notification): If there + is no attachment for a audio reminder, only a message window + shows up. + Get a beep sound even without attachment for audio reminder. + 2004-03-22 Rodrigo Moya * gui/e-calendar-view.c (e_calendar_view_add_event): get the UID diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 85bc818f55..41088a3c7e 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1041,6 +1041,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa, ECalComponent *comp; ECalComponentAlarm *alarm; icalattach *attach; + int flag = 0; comp = cqa->alarms->comp; qa = lookup_queued_alarm (cqa, alarm_id); @@ -1058,12 +1059,15 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa, url = icalattach_get_url (attach); - if (url && *url && g_file_test (url, G_FILE_TEST_EXISTS)) + if (url && *url && g_file_test (url, G_FILE_TEST_EXISTS)) { + flag = 1; gnome_sound_play (url); /* this sucks */ - else - gdk_beep (); + } } + if (!flag) + gdk_beep (); + if (attach) icalattach_unref (attach); diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c index 512020d4d6..5f57984306 100644 --- a/calendar/gui/dialogs/alarm-options.c +++ b/calendar/gui/dialogs/alarm-options.c @@ -649,7 +649,7 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) eab_destination_freev (destv); /* Description */ - text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description)); + text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description)); gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start); gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end); str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE); -- cgit v1.2.3