Fixes for vTodo thingies -mig
svn path=/trunk/; revision=190
This commit is contained in:
@ -483,12 +483,19 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
|
|||||||
ical->dtstart = 0;
|
ical->dtstart = 0;
|
||||||
|
|
||||||
/* dtend */
|
/* dtend */
|
||||||
if (has (o, VCDTendProp)){
|
ical->dtend = 0; /* default value */
|
||||||
ical->dtend = time_from_isodate (str_val (vo));
|
if (ical->type == ICAL_EVENT){
|
||||||
free (the_str);
|
if (has (o, VCDTendProp)){
|
||||||
} else
|
ical->dtend = time_from_isodate (str_val (vo));
|
||||||
ical->dtend = 0;
|
free (the_str);
|
||||||
|
}
|
||||||
|
} else if (ical->type == ICAL_TODO){
|
||||||
|
if (has (o, VCDueProp)){
|
||||||
|
ical->dtend = time_from_isodate (str_val (vo));
|
||||||
|
free (the_str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* dcreated */
|
/* dcreated */
|
||||||
if (has (o, VCDCreatedProp)){
|
if (has (o, VCDCreatedProp)){
|
||||||
ical->created = time_from_isodate (str_val (vo));
|
ical->created = time_from_isodate (str_val (vo));
|
||||||
@ -775,7 +782,11 @@ ical_object_to_vobject (iCalObject *ical)
|
|||||||
addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart));
|
addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart));
|
||||||
|
|
||||||
/* dtend */
|
/* dtend */
|
||||||
addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
|
if (ical->type == ICAL_EVENT){
|
||||||
|
addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
|
||||||
|
} else if (ical->type == ICAL_TODO){
|
||||||
|
addPropValue (o, VCDueProp, isodate_from_time_t (ical->dtend));
|
||||||
|
}
|
||||||
|
|
||||||
/* dcreated */
|
/* dcreated */
|
||||||
addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created));
|
addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created));
|
||||||
|
@ -483,12 +483,19 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
|
|||||||
ical->dtstart = 0;
|
ical->dtstart = 0;
|
||||||
|
|
||||||
/* dtend */
|
/* dtend */
|
||||||
if (has (o, VCDTendProp)){
|
ical->dtend = 0; /* default value */
|
||||||
ical->dtend = time_from_isodate (str_val (vo));
|
if (ical->type == ICAL_EVENT){
|
||||||
free (the_str);
|
if (has (o, VCDTendProp)){
|
||||||
} else
|
ical->dtend = time_from_isodate (str_val (vo));
|
||||||
ical->dtend = 0;
|
free (the_str);
|
||||||
|
}
|
||||||
|
} else if (ical->type == ICAL_TODO){
|
||||||
|
if (has (o, VCDueProp)){
|
||||||
|
ical->dtend = time_from_isodate (str_val (vo));
|
||||||
|
free (the_str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* dcreated */
|
/* dcreated */
|
||||||
if (has (o, VCDCreatedProp)){
|
if (has (o, VCDCreatedProp)){
|
||||||
ical->created = time_from_isodate (str_val (vo));
|
ical->created = time_from_isodate (str_val (vo));
|
||||||
@ -775,7 +782,11 @@ ical_object_to_vobject (iCalObject *ical)
|
|||||||
addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart));
|
addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart));
|
||||||
|
|
||||||
/* dtend */
|
/* dtend */
|
||||||
addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
|
if (ical->type == ICAL_EVENT){
|
||||||
|
addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
|
||||||
|
} else if (ical->type == ICAL_TODO){
|
||||||
|
addPropValue (o, VCDueProp, isodate_from_time_t (ical->dtend));
|
||||||
|
}
|
||||||
|
|
||||||
/* dcreated */
|
/* dcreated */
|
||||||
addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created));
|
addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created));
|
||||||
|
@ -206,7 +206,7 @@ gncal_year_view_set_year (GncalYearView *yview, int year)
|
|||||||
|
|
||||||
year_begin = time_year_begin (yview->year);
|
year_begin = time_year_begin (yview->year);
|
||||||
year_end = time_year_end (yview->year);
|
year_end = time_year_end (yview->year);
|
||||||
|
|
||||||
l = calendar_get_events_in_range (yview->gcal->cal, year_begin, year_end);
|
l = calendar_get_events_in_range (yview->gcal->cal, year_begin, year_end);
|
||||||
for (; l; l = l->next){
|
for (; l; l = l->next){
|
||||||
CalendarObject *co = l->data;
|
CalendarObject *co = l->data;
|
||||||
|
@ -483,12 +483,19 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
|
|||||||
ical->dtstart = 0;
|
ical->dtstart = 0;
|
||||||
|
|
||||||
/* dtend */
|
/* dtend */
|
||||||
if (has (o, VCDTendProp)){
|
ical->dtend = 0; /* default value */
|
||||||
ical->dtend = time_from_isodate (str_val (vo));
|
if (ical->type == ICAL_EVENT){
|
||||||
free (the_str);
|
if (has (o, VCDTendProp)){
|
||||||
} else
|
ical->dtend = time_from_isodate (str_val (vo));
|
||||||
ical->dtend = 0;
|
free (the_str);
|
||||||
|
}
|
||||||
|
} else if (ical->type == ICAL_TODO){
|
||||||
|
if (has (o, VCDueProp)){
|
||||||
|
ical->dtend = time_from_isodate (str_val (vo));
|
||||||
|
free (the_str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* dcreated */
|
/* dcreated */
|
||||||
if (has (o, VCDCreatedProp)){
|
if (has (o, VCDCreatedProp)){
|
||||||
ical->created = time_from_isodate (str_val (vo));
|
ical->created = time_from_isodate (str_val (vo));
|
||||||
@ -775,7 +782,11 @@ ical_object_to_vobject (iCalObject *ical)
|
|||||||
addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart));
|
addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart));
|
||||||
|
|
||||||
/* dtend */
|
/* dtend */
|
||||||
addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
|
if (ical->type == ICAL_EVENT){
|
||||||
|
addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
|
||||||
|
} else if (ical->type == ICAL_TODO){
|
||||||
|
addPropValue (o, VCDueProp, isodate_from_time_t (ical->dtend));
|
||||||
|
}
|
||||||
|
|
||||||
/* dcreated */
|
/* dcreated */
|
||||||
addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created));
|
addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created));
|
||||||
|
@ -206,7 +206,7 @@ gncal_year_view_set_year (GncalYearView *yview, int year)
|
|||||||
|
|
||||||
year_begin = time_year_begin (yview->year);
|
year_begin = time_year_begin (yview->year);
|
||||||
year_end = time_year_end (yview->year);
|
year_end = time_year_end (yview->year);
|
||||||
|
|
||||||
l = calendar_get_events_in_range (yview->gcal->cal, year_begin, year_end);
|
l = calendar_get_events_in_range (yview->gcal->cal, year_begin, year_end);
|
||||||
for (; l; l = l->next){
|
for (; l; l = l->next){
|
||||||
CalendarObject *co = l->data;
|
CalendarObject *co = l->data;
|
||||||
|
Reference in New Issue
Block a user