From efe6023858f45b17496f014b70990191ad860f6a Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 24 May 2007 22:18:51 +0000 Subject: [PATCH] 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. --- webcit/calendar_view.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) 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( -- 2.39.2