aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/cal-util/calobj.c61
-rw-r--r--calendar/cal-util/calobj.h3
-rw-r--r--calendar/calobj.c61
-rw-r--r--calendar/calobj.h3
-rw-r--r--calendar/pcs/calobj.c61
-rw-r--r--calendar/pcs/calobj.h3
6 files changed, 147 insertions, 45 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index e8da288153..2ff626c469 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/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/cal-util/calobj.h b/calendar/cal-util/calobj.h
index 8cbdffa484..c499568bf7 100644
--- a/calendar/cal-util/calobj.h
+++ b/calendar/cal-util/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 */
diff --git a/calendar/calobj.c b/calendar/calobj.c
index e8da288153..2ff626c469 100644
--- a/calendar/calobj.c
+++ b/calendar/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/calobj.h b/calendar/calobj.h
index 8cbdffa484..c499568bf7 100644
--- a/calendar/calobj.h
+++ b/calendar/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 */
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 */