if (StrLength(Mime->Data) > 0) {
struct vnote *v;
StrBuf *Buf;
+ char *vcard;
Buf = NewStrBuf();
- v = vnote_new_from_str(ChrPtr(Mime->Data));
+ vcard = SmashStrBuf(&Mime->Data);
+ v = vnote_new_from_str(vcard);
+ free (vcard);
if (v) {
WCTemplputParams TP;
Buf, &TP);
vnote_free(v);
-
- FreeStrBuf(&Mime->Data);
Mime->Data = Buf;
}
else
- FlushStrBuf(Mime->Data);
+ Mime->Data = NewStrBuf();
}
}
/* Spit out the new summary view. This is basically a static page, so clients can cache the layout, all the dirty work is javascript :) */
void new_summary_view(void) {
- begin_burst();
DoTemplate(HKEY("msg_listview"),NULL,&NoCtx);
DoTemplate(HKEY("trailing"),NULL,&NoCtx);
- end_burst();
}
Stat->maxmsgs = abs(Stat->maxmsgs);
}
- memset(&SubTP, 0, sizeof(WCTemplputParams));
- SubTP.Filter.ContextType = CTX_STRBUF;
- SubTP.Context = VS->MessageDropdown;
- DoTemplate(HKEY("msg_listselector_top"), VS->BBViewToolBar, &SubTP);
- StrBufAppendBuf(WC->WBuf, VS->BBViewToolBar, 0);
- FlushStrBuf(VS->BBViewToolBar);
+ if (Stat->nummsgs > 0) {
+ memset(&SubTP, 0, sizeof(WCTemplputParams));
+ SubTP.Filter.ContextType = CTX_STRBUF;
+ SubTP.Context = VS->MessageDropdown;
+ DoTemplate(HKEY("msg_listselector_top"), VS->BBViewToolBar, &SubTP);
+ StrBufAppendBuf(WC->WBuf, VS->BBViewToolBar, 0);
+ FlushStrBuf(VS->BBViewToolBar);
+ }
return 200;
}