/*
- * 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);
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);
}
/*