From 55b90a65bdd0216bc7baa18cdf4ba8fab2427d13 Mon Sep 17 00:00:00 2001 From: ajc Date: Fri, 20 Mar 2009 16:20:25 +0000 Subject: [PATCH] * 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.) git-svn-id: svn://uncensored.citadel.org/trunk@7242 c9418f8e-8c02-0410-9258-ad310909226a --- webcit/calendar_view.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 635e96a0..41a03ac3 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) { -- 2.11.4.GIT