summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 1e4eab6da..26c5573ed 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -1775,8 +1775,12 @@ TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
int slashPos = fileName.findRev( '/' );
if( -1 != slashPos )
fileName = fileName.mid( slashPos + 1 );
- if( fileName.isEmpty() )
+ if( fileName.isEmpty() ) {
fileName = "unnamed";
+ // Save html emails with extension
+ if (aMsgPart->subtype() == DwMime::kSubtypeHtml )
+ fileName += ".html";
+ }
fname += "/" + fileName;
TQByteArray data = aMsgPart->bodyDecodedBinary();
@@ -3041,11 +3045,11 @@ TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor
html += "</div>";
}
} else {
+ TQString fileName = writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
partNode::AttachmentDisplayInfo info = node->attachmentDisplayInfo();
if ( info.displayInHeader ) {
html += "<div style=\"float:left;\">";
html += TQString::fromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() );
- TQString fileName = writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
TQString href = node->asHREF( "header" );
html += TQString::fromLatin1( "<a href=\"" ) + href +
TQString::fromLatin1( "\">" );