X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcalendar_view.c;h=699d83e73835d5099a9fc7c88aec0924af37f9fc;hb=2296667b6c9a9b2f56d9c8bfc29ce5d2a9618852;hp=b5525b1beb5274d461db2a0b257f008fa628005d;hpb=b6f8c3d1bf44933ed4fcdc8741f669e168842edc;p=citadel.git diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index b5525b1be..699d83e73 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -259,14 +259,16 @@ void calendar_month_view_display_events(int year, int month, int day) } wprintf("" - "unread)?"_unread":"_read", WC->disp_cal[i].cal_msgnum, year, month, day ); - wprintf("%s ", _("Summary:")); + wprintf("%s: %s
", _("From"), Cal->from); + wprintf("%s ", _("Summary:")); escputs((char *)icalproperty_get_comment(p)); wprintf("
"); @@ -356,12 +358,14 @@ void calendar_month_view_brief_events(time_t thetime, const char *daycolor) { time_t event_tt; time_t event_tts; time_t event_tte; + struct wcsession *WCC = WC; /* This is done to make it run faster; WC is a function */ struct tm event_tms; struct tm event_tme; struct tm today_tm; icalproperty *p; icalproperty *e; struct icaltimetype t; + struct disp_cal *Cal; int month, day, year; int all_day_event = 0; char *timeformat; @@ -378,7 +382,8 @@ void calendar_month_view_brief_events(time_t thetime, const char *daycolor) { year = today_tm.tm_year + 1900; for (i=0; i<(WC->num_cal); ++i) { - p = icalcomponent_get_first_property(WC->disp_cal[i].cal, + Cal = &WCC->disp_cal[i]; + p = icalcomponent_get_first_property(Cal->cal, ICAL_DTSTART_PROPERTY); if (p != NULL) { t = icalproperty_get_dtstart(p); @@ -418,16 +423,17 @@ void calendar_month_view_brief_events(time_t thetime, const char *daycolor) { hours=(int)(difftime / 60); minutes=difftime % 60; wprintf("%i:%2i" - "" - "
", - daycolor, - hours, minutes, - daycolor, - WC->disp_cal[i].cal_msgnum, - bstr("year"), - bstr("month"), - bstr("day") - ); + "" + "", + daycolor, + hours, minutes, + (Cal->unread)?"_unread":"_read", + daycolor, + WC->disp_cal[i].cal_msgnum, + bstr("year"), + bstr("month"), + bstr("day") + ); escputs((char *) icalproperty_get_comment(p)); @@ -880,14 +886,16 @@ void calendar_day_view_display_events(time_t thetime, if (all_day_event && notime_events) { - wprintf("
  • " + wprintf("
  • " "unread)?"_unread":"_read", Cal->cal_msgnum, year, month, day); - wprintf("%s
    ", _("All day event")); - wprintf("%s ", _("Summary:")); + wprintf("%s
    ", _("All day event")); + wprintf("%s: %s
    ", _("From"), Cal->from); + wprintf("%s ", _("Summary:")); escputs((char *) icalproperty_get_comment(p)); wprintf("
    "); q = icalcomponent_get_first_property(Cal->cal,ICAL_LOCATION_PROPERTY); @@ -916,14 +924,16 @@ void calendar_day_view_display_events(time_t thetime, } else if (ongoing_event && notime_events) { - wprintf("
  • " + wprintf("
  • " "unread)?"_unread":"_read", Cal->cal_msgnum, year, month, day); - wprintf("%s
    ", _("Ongoing event")); - wprintf("%s ", _("Summary:")); + wprintf("%s
    ", _("Ongoing event")); + wprintf("%s: %s
    ", _("From"), Cal->from); + wprintf("%s ", _("Summary:")); escputs((char *) icalproperty_get_comment(p)); wprintf("
    "); q = icalcomponent_get_first_property(Cal->cal,ICAL_LOCATION_PROPERTY); @@ -989,10 +999,11 @@ void calendar_day_view_display_events(time_t thetime, /* should never get here */ } - wprintf("
    ", + (Cal->unread)?"_unread":"_read", top, (gap * 40), (bottom-top) ); wprintf("cal_msgnum, year, month, day, t.hour); - wprintf("%s ", _("Summary:")); + wprintf("%s: %s
    ", _("From"), Cal->from); + wprintf("%s ", _("Summary:")); escputs((char *) icalproperty_get_comment(p)); wprintf("
    "); q = icalcomponent_get_first_property(Cal->cal,ICAL_LOCATION_PROPERTY);