[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kmail
From: Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date: 2003-10-01 9:46:28
[Download RAW message or body]
CVS commit by mutz:
Implement more of the smart attachment strategy in SmartAttachmentStrategy, namely \
the special text/* handling found in ObjectTreeParser::processTextPlainSubtype()
M +17 -2 attachmentstrategy.cpp 1.7
--- kdepim/kmail/attachmentstrategy.cpp #1.6:1.7
@@ -33,4 +33,7 @@
#include "partNode.h"
+#include "kmmsgpart.h"
+
+#include <qstring.h>
#include <kdebug.h>
@@ -63,5 +66,6 @@ namespace KMail {
// SmartAttachmentStrategy:
// in addition to Iconic, show all body parts
- // with content-disposition == "inline" inline
+ // with content-disposition == "inline" and
+ // all text parts without a filename or name parameter inline
//
@@ -79,5 +83,16 @@ namespace KMail {
bool inlineNestedMessages() const { return true; }
Display defaultDisplay( const partNode * node ) const {
- return node->hasContentDispositionInline() ? Inline : AsIcon ;
+ if ( node->hasContentDispositionInline() )
+ // explict "inline" disposition:
+ return Inline;
+ if ( node->isAttachment() )
+ // explicit "attachment" disposition:
+ return AsIcon;
+ if ( node->type() == DwMime::kTypeText &&
+ node->msgPart().fileName().stripWhiteSpace().isEmpty() &&
+ node->msgPart().name().stripWhiteSpace().isEmpty() )
+ // text/* w/o filename parameter:
+ return Inline;
+ return AsIcon;
}
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic