summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/viewmail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index 0ad7359..d2e5e29 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -107,49 +107,49 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
o.setf(QTextStream::fixed);
o << s << " " << q << "Byte";
desc = body.Parts()[i].Description();
curItem=new AttachItem(attachments,curItem,type,desc,filename,fsize,i);
}
}
void ViewMail::slotShowHtml( bool state ) {
m_showHtml = state;
setText();
}
void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) {
if (!item )
return;
if ( ( ( AttachItem* )item )->Partnumber() == -1 ) {
setText();
return;
}
QPopupMenu *menu = new QPopupMenu();
int ret=0;
- if ( item->text( 0 ).left( 5 ) == "text/" ) {
+ if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" ) {
menu->insertItem( tr( "Show Text" ), 1 );
}
menu->insertItem( tr( "Save Attachment" ), 0 );
menu->insertSeparator(1);
ret = menu->exec( point, 0 );
switch(ret) {
case 0:
{ MimeTypes types;
types.insert( "all", "*" );
QString str = OFileDialog::getSaveFileName( 1,
"/", item->text( 2 ) , types, 0 );
if( !str.isEmpty() ) {
encodedString*content = m_recMail.Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
if (content) {
QFile output(str);
output.open(IO_WriteOnly);
output.writeBlock(content->Content(),content->Length());
output.close();
delete content;
}
}