X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsummary.c;h=fb34a85837a4fa08f84fd1a6c091933ceb891750;hb=72015d547deb7e4632f70ad8dcae2d56ed8bfcca;hp=ae2588da2651a541f7dd5523afe3757bc4c2a874;hpb=172623f613d7a063ded70251cdb18b1e38030e10;p=citadel.git diff --git a/webcit/summary.c b/webcit/summary.c index ae2588da2..fb34a8583 100644 --- a/webcit/summary.c +++ b/webcit/summary.c @@ -5,6 +5,7 @@ */ #include "webcit.h" +#include "calendar.h" /* * Display today's date in a friendly format @@ -84,7 +85,9 @@ void tasks_section(void) { message_summary *Msg; wcsession *WCC = WC; StrBuf *Buf; + SharedMessageStatus Stat; + memset(&Stat, 0, sizeof(SharedMessageStatus)); Buf = NewStrBufPlain(HKEY("_TASKS_")); gotoroom(Buf); FreeStrBuf(&Buf); @@ -92,14 +95,14 @@ void tasks_section(void) { num_msgs = 0; } else { - num_msgs = load_msg_ptrs("MSGS ALL", 0, NULL, NULL); + num_msgs = load_msg_ptrs("MSGS ALL", &Stat); } if (num_msgs > 0) { at = GetNewHashPos(WCC->summ, 0); while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) { Msg = (message_summary*) vMsg; - display_task(Msg, 0); + tasks_LoadMsgFromServer(NULL, NULL, Msg, 0, 0); } DeleteHashPos(&at); } @@ -116,6 +119,7 @@ void tasks_section(void) { * Calendar section */ void calendar_section(void) { + char cmd[SIZ]; int num_msgs = 0; HashPos *at; const char *HashKey; @@ -123,9 +127,12 @@ void calendar_section(void) { void *vMsg; message_summary *Msg; wcsession *WCC = WC; - struct calview c; + calview c; StrBuf *Buf; + void *v = &c; + SharedMessageStatus Stat; + memset(&Stat, 0, sizeof(SharedMessageStatus)); Buf = NewStrBufPlain(HKEY("_CALENDAR_")); gotoroom(Buf); FreeStrBuf(&Buf); @@ -133,16 +140,19 @@ void calendar_section(void) { num_msgs = 0; } else { - num_msgs = load_msg_ptrs("MSGS ALL", 0, NULL, NULL); + num_msgs = load_msg_ptrs("MSGS ALL", &Stat); } - - parse_calendar_view_request(&c); + calendar_GetParamsGetServerCall(&Stat, + &c, + readnew, + cmd, + sizeof(cmd)); if (num_msgs > 0) { at = GetNewHashPos(WCC->summ, 0); while (GetNextHashPos(WCC->summ, at, &HKLen, &HashKey, &vMsg)) { Msg = (message_summary*) vMsg; - load_calendar_item(Msg, 0, &c); + calendar_LoadMsgFromServer(NULL, &v, Msg, 0, 0); } DeleteHashPos(&at); }