From 2f7a9932b1c1f14f5921c9f47863649cca9facd4 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 12 Nov 2002 05:57:27 +0000 Subject: [PATCH] * Display a nicer looking screen when replying to calendar invitations * When displaying day view, don't show all day events twice * Day or month view: denote all day events by displaying them inside a grey box. --- webcit/ChangeLog | 7 +++++++ webcit/calendar_view.c | 31 ++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 84515b1cb..a28e61d1c 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,10 @@ $Log$ +Revision 400.47 2002/11/12 05:57:27 ajc +* Display a nicer looking screen when replying to calendar invitations +* When displaying day view, don't show all day events twice +* Day or month view: denote all day events by displaying them inside + a grey box. + Revision 400.46 2002/11/12 03:26:39 ajc * Tell the user about broken Citadel server connections instead of simply printing "Goodbye" @@ -1098,3 +1104,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index a015a869c..c2bcab35e 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -42,6 +42,7 @@ void calendar_month_view_display_events(time_t thetime) { icalproperty *p; struct icaltimetype t; int month, day, year; + int all_day_event = 0; if (WC->num_cal == 0) { wprintf("


\n"); @@ -62,10 +63,19 @@ void calendar_month_view_display_events(time_t thetime) { && (t.month == month) && (t.day == day)) { + if (t.is_date) all_day_event = 1; + p = icalcomponent_get_first_property( WC->disp_cal[i], ICAL_SUMMARY_PROPERTY); if (p != NULL) { + + if (all_day_event) { + wprintf("" + "
" + ); + } + wprintf("" "", WC->cal_msgnum[i], @@ -77,6 +87,11 @@ void calendar_month_view_display_events(time_t thetime) { escputs((char *) icalproperty_get_comment(p)); wprintf("
\n"); + + if (all_day_event) { + wprintf("
"); + } + } } @@ -214,6 +229,7 @@ void calendar_day_view_display_events(int year, int month, int i; icalproperty *p; struct icaltimetype t; + int all_day_event = 0; if (WC->num_cal == 0) { wprintf("


\n"); @@ -228,13 +244,22 @@ void calendar_day_view_display_events(int year, int month, if ((t.year == year) && (t.month == month) && (t.day == day) - && ( (t.hour == hour) || ((hour<0)&&(t.is_date)) ) + && ( ((t.hour == hour)&&(!t.is_date)) || ((hour<0)&&(t.is_date)) ) ) { + if (t.is_date) all_day_event = 1; + p = icalcomponent_get_first_property( WC->disp_cal[i], ICAL_SUMMARY_PROPERTY); if (p != NULL) { + + if (all_day_event) { + wprintf("" + "
" + ); + } + wprintf("" "", WC->cal_msgnum[i], @@ -243,6 +268,10 @@ void calendar_day_view_display_events(int year, int month, escputs((char *) icalproperty_get_comment(p)); wprintf("
\n"); + + if (all_day_event) { + wprintf("
"); + } } } -- 2.39.2