aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-05-14 02:15:38 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-05-14 02:15:38 +0800
commit8806dd20bab6a837c07167034906dc0b7864260e (patch)
treec46c02530f329319b1e05301a66237d09ad1c99f /calendar
parent989f63407104ff10fe275baf68bfe0b53fd693fb (diff)
downloadgsoc2013-evolution-8806dd20bab6a837c07167034906dc0b7864260e.tar.gz
gsoc2013-evolution-8806dd20bab6a837c07167034906dc0b7864260e.tar.zst
gsoc2013-evolution-8806dd20bab6a837c07167034906dc0b7864260e.zip
Fixes #41760
2003-05-12 Rodrigo Moya <rodrigo@ximian.com> Fixes #41760 * gui/alarm-notify/alarm-queue.c (create_snooze): don't add a new alarm, but update the already existing one. (notify_dialog_cb): make sure we don't remove the alarm if we are snoozing. svn path=/trunk/; revision=21160
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c22
2 files changed, 14 insertions, 17 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index b6e5296c95..23cf94c1ee 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2003-05-12 Rodrigo Moya <rodrigo@ximian.com>
+
+ Fixes #41760
+
+ * gui/alarm-notify/alarm-queue.c (create_snooze): don't add a new
+ alarm, but update the already existing one.
+ (notify_dialog_cb): make sure we don't remove the alarm if we are
+ snoozing.
+
2003-05-07 JP Rosevear <jpr@ximian.com>
* gui/dialogs/task-page.glade: fix button conversion problem
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 9aff1a8bf0..eefd954f15 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -580,8 +580,7 @@ obj_removed_cb (CalClient *client, const char *uid, gpointer data)
static void
create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, int snooze_mins)
{
- QueuedAlarm *orig_qa, *qa;
- CalAlarmInstance *instance;
+ QueuedAlarm *orig_qa;
time_t t;
gpointer new_id;
@@ -599,20 +598,9 @@ create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, int snooze_mins)
return;
}
- instance = g_new (CalAlarmInstance, 1);
- instance->auid = orig_qa->instance->auid;
- instance->trigger = t;
- instance->occur_start = orig_qa->instance->occur_start;
- instance->occur_end = orig_qa->instance->occur_end;
-
- cqa->alarms->alarms = g_slist_prepend (cqa->alarms->alarms, instance);
-
- qa = g_new (QueuedAlarm, 1);
- qa->alarm_id = new_id;
- qa->instance = instance;
- qa->snooze = TRUE;
-
- cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
+ orig_qa->instance->trigger = t;
+ orig_qa->alarm_id = new_id;
+ orig_qa->snooze = TRUE;
}
/* Launches a component editor for a component */
@@ -707,7 +695,7 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
switch (result) {
case ALARM_NOTIFY_SNOOZE:
create_snooze (c->cqa, c->alarm_id, snooze_mins);
- break;
+ return;
case ALARM_NOTIFY_EDIT:
edit_component (c->client, c->comp);