diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-11-20 22:16:34 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-11-20 22:16:34 +0800 |
commit | e17affcfcc0c7d1dbf43cfc461223c5008cca206 (patch) | |
tree | 1889f09750eb750dec67064ecca3684f0ebb87b8 /calendar | |
parent | d7d0afca0eff24874b76e6eeb07ea5c0d28a00b3 (diff) | |
download | gsoc2013-evolution-e17affcfcc0c7d1dbf43cfc461223c5008cca206.tar.gz gsoc2013-evolution-e17affcfcc0c7d1dbf43cfc461223c5008cca206.tar.zst gsoc2013-evolution-e17affcfcc0c7d1dbf43cfc461223c5008cca206.zip |
Fixes #367183.
svn path=/trunk/; revision=33003
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b2620c9554..d235e04709 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2006-11-20 Carlos Garcia Campos <carlosgc@gnome.org> + + Fixes bug #367183 + * gui/e-cal-model.c: (e_cal_model_set_instance_times): Make end_time a + valid date for all day events when ical file doesn't provide neither + DTEND nor DURATION for such events. + 2006-11-15 Chenthill Palanisamy <pchenthill@novell.com> * gui/gnome-cal.c: (client_cal_opened_cb), diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 0797144c3e..6b47fb96e1 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2105,7 +2105,16 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon start_time = icalcomponent_get_dtstart (comp_data->icalcomp); end_time = icalcomponent_get_dtend (comp_data->icalcomp); - if (start_time.is_date && end_time.is_date && (icaltime_compare_date_only (start_time, end_time) == 0)) { + if (icaltime_is_null_time (end_time)) { + /* If end_time is null and it's an all day event, + * just make start_time = end_time so that end_time + * will be a valid date + */ + end_time = start_time; + icaltime_adjust (&end_time, 1, 0, 0, 0); + icalcomponent_set_dtend (comp_data->icalcomp, end_time); + } else if (start_time.is_date && end_time.is_date && + (icaltime_compare_date_only (start_time, end_time) == 0)) { /* If both DTSTART and DTEND are DATE values, and they are the same day, we add 1 day to DTEND. This means that most events created with the old Evolution behavior will still |