In the calendar month view bubble popups,
authorArt Cancro <ajc@citadel.org>
Thu, 24 May 2007 22:18:51 +0000 (22:18 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 24 May 2007 22:18:51 +0000 (22:18 +0000)
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

index a783a45bd14533b5f149abb6066d3415d4ea7805..9315c55565b344dc95a9222628a976ad863a89b1 100644 (file)
@@ -139,18 +139,23 @@ void calendar_month_view_display_events(time_t thetime) {
                                                                fmt_date(buf, tt, 1);
                                                                wprintf("<i>%s</i> %s<br>",
                                                                        _("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("<i>%s</i> %s<br>",
+                                                                               _("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("<i>%s</i> %s<br>",
-                                                               _("Ending date/time:"), buf);
-                                               }
                                        }
 
                                        q = icalcomponent_get_first_property(