From: Art Cancro Date: Fri, 20 Mar 2009 16:20:25 +0000 (+0000) Subject: * Events and tasks which are missing a SUMMARY property are now displayed as 'Untitle... X-Git-Tag: v7.86~1326 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=7be09f98a6b14c681d8bc9c73ad159a49e9c2f6e * Events and tasks which are missing a SUMMARY property are now displayed as 'Untitled Event' or 'Untitled Task' instead of being omitted. (I saw those two strings already in the code, so hopefully they've already been localized.) --- diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 635e96a00..41a03ac39 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -245,6 +245,10 @@ void calendar_month_view_display_events(int year, int month, int day) */ if (show_event) { p = icalcomponent_get_first_property(Cal->cal, ICAL_SUMMARY_PROPERTY); + if (p == NULL) { + p = icalproperty_new_summary(_("Untitled Event")); + icalcomponent_add_property(Cal->cal, p); + } if (p != NULL) { if (all_day_event) { @@ -438,6 +442,10 @@ void calendar_month_view_brief_events(time_t thetime, const char *daycolor) { p = icalcomponent_get_first_property( Cal->cal, ICAL_SUMMARY_PROPERTY); + if (p == NULL) { + p = icalproperty_new_summary(_("Untitled Event")); + icalcomponent_add_property(Cal->cal, p); + } e = icalcomponent_get_first_property( Cal->cal, ICAL_DTEND_PROPERTY); @@ -908,6 +916,10 @@ void calendar_day_view_display_events(time_t thetime, /* If we determined that this event occurs today, then display it. */ p = icalcomponent_get_first_property(Cal->cal,ICAL_SUMMARY_PROPERTY); + if (p == NULL) { + p = icalproperty_new_summary(_("Untitled Event")); + icalcomponent_add_property(Cal->cal, p); + } if ((show_event) && (p != NULL)) { @@ -1362,6 +1374,10 @@ int calendar_summary_view(void) { ) { p = icalcomponent_get_first_property(Cal->cal, ICAL_SUMMARY_PROPERTY); + if (p == NULL) { + p = icalproperty_new_summary(_("Untitled Task")); + icalcomponent_add_property(Cal->cal, p); + } if (p != NULL) {