added handling of the 'Content-Disposition' field of multipart messages to

the reader.

svn path=/trunk/kdenetwork/kmail/; revision=3870
wilder-work
Stefan Taferner 29 years ago
parent c2bc07ab76
commit 45969610b0
  1. 20
      kmreaderwin.cpp

@ -184,8 +184,8 @@ void KMReaderWin::parseMsg(void)
{
KMMessagePart msgPart;
int i, numParts;
QString type, subtype, str;
QString type, subtype, str, contDisp;
bool asIcon;
assert(mMsg!=NULL);
mViewer->begin(mPicsDir);
@ -201,19 +201,25 @@ void KMReaderWin::parseMsg(void)
mMsg->bodyPart(i, &msgPart);
type = msgPart.typeStr();
subtype = msgPart.subtypeStr();
if (stricmp(type, "text")==0)
contDisp = msgPart.contentDisposition();
debug("content disposition: \"%s\"", contDisp.data());
if (i <= 0) asIcon = FALSE;
else asIcon = (stricmp(contDisp,"inline")!=0);
if (!asIcon)
{
str = msgPart.bodyDecoded();
if (str.size() > 100 && i>0) writePartIcon(&msgPart, i);
else
if (stricmp(type, "text")==0 || stricmp(type, "message")==0)
{
str = msgPart.bodyDecoded();
if (i>0) mViewer->write("<BR><HR><BR>");
if (stricmp(subtype, "html")==0) mViewer->write(str);
else writeBodyStr(str);
}
else asIcon = TRUE;
}
else
if (asIcon)
{
writePartIcon(&msgPart, i);
}

Loading…
Cancel
Save