aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-18 12:02:46 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-18 12:02:46 +0800
commitf1b08663ddff6432289ca4780bc823c96d471657 (patch)
treefed1c651f292c4855550302ef94808338b9fd0dc /calendar/cal-util
parentd79ee74dad39ee5210482aa90a7c6a7b2f0b7517 (diff)
downloadgsoc2013-evolution-f1b08663ddff6432289ca4780bc823c96d471657.tar.gz
gsoc2013-evolution-f1b08663ddff6432289ca4780bc823c96d471657.tar.zst
gsoc2013-evolution-f1b08663ddff6432289ca4780bc823c96d471657.zip
Yes.
Yes. It works. It loads, it saves, it does all that stuff. It works, even if federico complains that we did not test close. Repetition, alarms, all that stuff you all guys love. It it is there. We did minimal testing, but we know you will happilly commit a fix if you find a problem, right? Ok, we are off to a party now. Miguel svn path=/trunk/; revision=155
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/calobj.c18
-rw-r--r--calendar/cal-util/calobj.h7
2 files changed, 25 insertions, 0 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index 47d8c8a97e..624a179b05 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -1102,3 +1102,21 @@ ical_object_compute_end (iCalObject *ico)
ico->recur->_enddate = 0;
ical_object_generate_events (ico, ico->dtstart, 0, duration_callback, &count);
}
+
+int
+alarm_compute_offset (CalendarAlarm *a)
+{
+ if (!a->enabled)
+ return -1;
+ switch (a->units){
+ case ALARM_MINUTES:
+ a->offset = a->count * 60;
+ break;
+ case ALARM_HOURS:
+ a->offset = a->count * 3600;
+ break;
+ case ALARM_DAYS:
+ a->offset = a->count * 24 * 3600;
+ }
+ return a->offset;
+}
diff --git a/calendar/cal-util/calobj.h b/calendar/cal-util/calobj.h
index 26b0acf35b..60483c68ad 100644
--- a/calendar/cal-util/calobj.h
+++ b/calendar/cal-util/calobj.h
@@ -32,6 +32,10 @@ typedef struct {
int count;
enum AlarmUnit units;
char *data;
+
+ /* Does not get saved, internally used */
+ time_t offset;
+ time_t trigger;
/* Widgets */
void *w_count; /* A GtkEntry */
@@ -180,6 +184,9 @@ void ical_object_generate_events (iCalObject *ico, time_t start, time
/* Computes the enddate field of the recurrence based on the duration */
void ical_object_compute_end (iCalObject *ico);
+/* Returns the number of seconds configured to trigger the alarm in advance to an event */
+int alarm_compute_offset (CalendarAlarm *a);
+
END_GNOME_DECLS
#endif
6419752b85e249fc'>Remove USE_GNOME=gnometarget from ports. It has been a empty keyword sincekwm2011-08-121-1/+0 * - remove MD5ohauer2011-07-031-1/+0 * Fix build with Clangkwm2011-06-212-0/+34 * Update Gstreamer (core) to 0.10.33kwm2011-05-111-1/+0 * Fix build on -current with updated binutils.kwm2011-03-201-1/+1 * Fix the gstreamer ffmpeg plugin but borrowing a fix from the ffmpeg port.kwm2010-07-291-0/+3 * Update to 0.10.11.kwm2010-07-253-17/+8 * Make sure the bundled ffmpeg configure knows which compiler to use.kwm2010-05-301-0/+1 * Update to 0.10.10.kwm2010-03-302-5/+7 * Update to 0.10.8.kwm2009-07-152-4/+4 * Update to 0.10.7.kwm2009-04-062-4/+4 * Update to 0.10.6.kwm2009-01-284-9/+21 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1 * Update to 0.10.4ahze2008-05-272-5/+4 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-1/+1 * Update to 0.10.3ahze2008-01-083-16/+4 * Force -O2 in CFLAGS to fix runtime problems in -CURRENT and for anyone who se...ahze2007-07-051-0/+1 * - Welcome X.org 7.2 \o/.flz2007-05-201-0/+1 * Remove 4.x patch since we don't don't support gstreamer on 4.x anymoreahze2006-12-192-16/+1 * Update to 0.10.2.mezz2006-12-164-25/+9