/*
- * Display today's events.
+ * Display today's events. Returns the number of items displayed.
*/
-void calendar_summary_view(void) {
+int calendar_summary_view(void) {
long hklen;
const char *HashKey;
void *vCal;
int all_day_event = 0;
char timestring[SIZ];
wcsession *WCC = WC;
+ int num_displayed = 0;
if (GetCount(WC->disp_cal_items) == 0) {
- return;
+ return(0);
}
now = time(NULL);
"?gotofirst=",
Cal->cal_msgnum
);
- escputs(WCC->wc_roomname);
+ escputs(ChrPtr(WCC->wc_roomname));
wprintf("\">");
}
else {
today_tm.tm_mon + 1,
today_tm.tm_mday
);
- escputs(WCC->wc_roomname);
+ escputs(ChrPtr(WCC->wc_roomname));
wprintf("\">");
}
escputs((char *) icalproperty_get_comment(p));
- wprintf(" (%s)</a><br />\n", timestring);
+ if (!all_day_event) {
+ wprintf(" (%s)", timestring);
+ }
+ wprintf("</a><br />\n");
+ ++num_displayed;
}
}
}
}
DeleteHashPos(&Pos);
DeleteHash(&WC->disp_cal_items);
+ return(num_displayed);
}
/*
p = icalcomponent_get_first_property(Cal->cal,
ICAL_SUMMARY_PROPERTY);
wprintf("<a href=\"display_edit_task?msgnum=%ld?taskrm=", Cal->cal_msgnum);
- urlescputs(WC->wc_roomname);
+ urlescputs(ChrPtr(WC->wc_roomname));
wprintf("\">");
/* wprintf("<img align=middle "
"src=\"static/taskmanag_16x.gif\" border=0> "); */