bug 327602 - Move VTIMEZONEs to the beginning of a VCALENDAR to make CGPro happier. r1=ctalbert, r2=mvl

This commit is contained in:
mattwillis%gmail.com 2007-01-14 03:47:04 +00:00
Родитель cd1e51b090
Коммит 2e38d8111b
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -587,10 +587,14 @@ icalcomponent_add_component (icalcomponent* parent, icalcomponent* child)
child->parent = parent;
pvl_push(parent->components,child);
/* Fix for Mozilla - bug 327602 */
if (child->kind != ICAL_VTIMEZONE_COMPONENT) {
pvl_push(parent->components, child);
} else {
/* VTIMEZONES should be first in the resulting VCALENDAR. */
pvl_unshift(parent->components, child);
/* If the new component is a VTIMEZONE, add it to our array. */
if (child->kind == ICAL_VTIMEZONE_COMPONENT) {
/* Add the VTIMEZONE to our array. */
/* FIXME: Currently we are also creating this array when loading in
a builtin VTIMEZONE, when we don't need it. */
if (!parent->timezones)