From: Art Cancro Date: Thu, 24 May 2007 22:18:51 +0000 (+0000) Subject: In the calendar month view bubble popups, X-Git-Tag: v7.86~3357 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=efe6023858f45b17496f014b70990191ad860f6a;p=citadel.git In the calendar month view bubble popups, suppress the display of an event 'end time' if the start time was only a date (all day event). Some CUA's are declaring DTEND even for all day events. --- diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index a783a45bd..9315c5556 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -139,18 +139,23 @@ void calendar_month_view_display_events(time_t thetime) { fmt_date(buf, tt, 1); wprintf("%s %s
", _("Starting date/time:"), buf); + + /* Embed the 'show end date/time' loop inside here so it + * only executes if this is NOT an all day event. + */ + q = icalcomponent_get_first_property(WC->disp_cal[i].cal, + ICAL_DTEND_PROPERTY); + if (q != NULL) { + t = icalproperty_get_dtend(q); + tt = icaltime_as_timet(t); + fmt_date(buf, tt, 1); + wprintf("%s %s
", + _("Ending date/time:"), buf); + } + } } - q = icalcomponent_get_first_property(WC->disp_cal[i].cal, - ICAL_DTEND_PROPERTY); - if (q != NULL) { - t = icalproperty_get_dtend(q); - tt = icaltime_as_timet(t); - fmt_date(buf, tt, 1); - wprintf("%s %s
", - _("Ending date/time:"), buf); - } } q = icalcomponent_get_first_property(