aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-18 05:37:34 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-18 05:37:34 +0800
commit470866a2577773301742e2c1c83413c83249328a (patch)
tree2b819d5bf2108e88a581e7374ea180ea1760a143 /calendar/pcs
parent2ec1fdc08f38fd071909260d6dbcf4131b3fcfe4 (diff)
downloadgsoc2013-evolution-470866a2577773301742e2c1c83413c83249328a.tar.gz
gsoc2013-evolution-470866a2577773301742e2c1c83413c83249328a.tar.zst
gsoc2013-evolution-470866a2577773301742e2c1c83413c83249328a.zip
We load the alarms -mig
svn path=/trunk/; revision=150
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/calobj.c61
-rw-r--r--calendar/pcs/calobj.h3
2 files changed, 49 insertions, 15 deletions
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c
index e8da288153..2ff626c469 100644
--- a/calendar/pcs/calobj.c
+++ b/calendar/pcs/calobj.c
@@ -425,7 +425,7 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
{
time_t now = time (NULL);
iCalObject *ical;
- VObject *vo;
+ VObject *vo, *a;
VObjectIterator i;
char *the_str;
@@ -564,24 +564,57 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
free (the_str);
}
- /* FIXME: dalarm */
+ /* dalarm */
if (has (o, VCDAlarmProp)){
-
+ ical->dalarm.type = ALARM_DISPLAY;
+ if ((a = is_a_prop_of (o, VCRunTimeProp))){
+ ical->dalarm.enabled = 1;
+ ical->dalarm.time = time_from_isodate (str_val (a));
+ free (the_str);
+ }
}
- /* FIXME: aalarm */
- if (has (o, VCAAlarmProp))
- ;
+ /* aalarm */
+ if (has (o, VCAAlarmProp)){
+ ical->aalarm.type = ALARM_AUDIO;
+ if ((a = is_a_prop_of (o, VCRunTimeProp))){
+ ical->aalarm.enabled = 1;
+ ical->aalarm.time = time_from_isodate (str_val (a));
+ free (the_str);
+ }
+ }
+
+ /* palarm */
+ if (has (o, VCPAlarmProp)){
+ ical->palarm.type = ALARM_PROGRAM;
+ if ((a = is_a_prop_of (o, VCRunTimeProp))){
+ ical->palarm.enabled = 1;
+ ical->palarm.time = time_from_isodate (str_val (a));
+ free (the_str);
- /* FIXME: palarm */
- if (has (o, VCPAlarmProp))
- ;
+ if ((a = is_a_prop_of (o, VCProcedureNameProp))){
+ ical->palarm.data = g_strdup (str_val (a));
+ free (the_str);
+ }
+ }
+ }
- /* FIXME: malarm */
- if (has (o, VCMAlarmProp))
- ;
+ /* malarm */
+ if (has (o, VCMAlarmProp)){
+ ical->malarm.type = ALARM_MAIL;
+ if ((a = is_a_prop_of (o, VCRunTimeProp))){
+ ical->malarm.enabled = 1;
+ ical->malarm.time = time_from_isodate (str_val (a));
+ free (the_str);
+
+ if ((a = is_a_prop_of (o, VCProcedureNameProp))){
+ ical->malarm.data = g_strdup (str_val (a));
+ free (the_str);
+ }
+ }
+ }
- /* FIXME: rrule */
+ /* rrule */
if (has (o, VCRRuleProp)){
if (!load_recurrence (ical, str_val (vo))) {
ical_object_destroy (ical);
@@ -897,7 +930,7 @@ ical_object_generate_events (iCalObject *ico, time_t start, time_t end, calendar
do {
struct tm tm;
time_t t;
- int p, week_day_start;
+ int week_day_start;
tm = *localtime (&current);
tm.tm_mday = 1;
diff --git a/calendar/pcs/calobj.h b/calendar/pcs/calobj.h
index 8cbdffa484..c499568bf7 100644
--- a/calendar/pcs/calobj.h
+++ b/calendar/pcs/calobj.h
@@ -32,7 +32,8 @@ typedef struct {
int count;
enum AlarmUnit units;
char *data;
-
+ time_t time;
+
/* Widgets */
void *w_count; /* A GtkEntry */
void *w_enabled; /* A GtkChecButton */