From 69278b6718841e50b02b14813137457257445f8c Mon Sep 17 00:00:00 2001 From: Jaime Torres Amate Date: Fri, 9 Oct 2009 15:45:49 +0000 Subject: [PATCH 01/15] Fix for a regression I introduced with http://reviewboard.kde.org/r/1293 In the new and old location of the code. svn path=/trunk/KDE/kdepim/; revision=1033146 --- headerstyle.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/headerstyle.cpp b/headerstyle.cpp index 47a695ad9..1b0176226 100644 --- a/headerstyle.cpp +++ b/headerstyle.cpp @@ -379,12 +379,22 @@ namespace KMail { } QString titleText; - QString confidenceString; - if ( spamError == noError ) { - confidenceString = ( confidence >= 0 ? QString::number( confidence ) + "% " : QString() ) + " "; - titleText = i18n("%1% probability of being spam with confidence %3%.\n\n" - "Full report:\nProbability=%2\nConfidence=%4", - percent, filterHeader, confidence, confidenceHeader ); + QString confidenceString = QString(); + if ( spamError == noError ) + { + if ( confidence >= 0 ) + { + confidenceString = QString::number( confidence ) + "%  "; + titleText = i18n("%1% probability of being spam with confidence %3%.\n\n" + "Full report:\nProbability=%2\nConfidence=%4", + percent, filterHeader, confidence, confidenceHeader ); + } + else // do not show negative confidence + { + titleText = i18n("%1% probability of being spam.\n\n" + "Full report:\nProbability=%2", + percent, filterHeader); + } } else { From c26197d58a23f9aa93a6e45ed9289b580447cf9a Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 19:44:15 +0000 Subject: [PATCH 02/15] SVN_MERGE Merged revisions 1029632 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1029632 | winterz | 2009-09-30 14:29:22 +0200 (Wed, 30 Sep 2009) | 9 lines Merged revisions 1029609 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1029609 | tmcguire | 2009-09-30 06:42:06 -0400 (Wed, 30 Sep 2009) | 1 line Work around a problem with buildObjectTree() modifing parent nodes by calling that before setting the parent. ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033242 --- objecttreeparser.cpp | 7 +++++-- partNode.cpp | 3 ++- partNode.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/objecttreeparser.cpp b/objecttreeparser.cpp index 5572e1dcc..087b1003e 100644 --- a/objecttreeparser.cpp +++ b/objecttreeparser.cpp @@ -213,6 +213,11 @@ namespace KMail { partNode* parentNode = &startNode; partNode* newNode = new partNode(false, myBody); + + // Build the object tree of the new node before setting the parent, as otherwise + // buildObjectTree() would erronously modify the parents as well + newNode->buildObjectTree( false ); + if ( append && parentNode->firstChild() ) { parentNode = parentNode->firstChild(); while( parentNode->nextSibling() ) @@ -221,8 +226,6 @@ namespace KMail { } else parentNode->setFirstChild( newNode ); - newNode->buildObjectTree( false ); - if ( startNode.mimePartTreeItem() ) { newNode->fillMimePartTree( startNode.mimePartTreeItem(), 0, QString(), QString(), QString(), 0, diff --git a/partNode.cpp b/partNode.cpp index 76ac5253a..6f390bddd 100644 --- a/partNode.cpp +++ b/partNode.cpp @@ -181,7 +181,8 @@ partNode::~partNode() #ifndef NDEBUG void partNode::dump( int chars ) const { kDebug() << QString().fill( ' ', chars ) <<"+" - << typeString() << '/' << subTypeString() << " embedded:" << mDisplayedEmbedded; + << typeString() << '/' << subTypeString() << " embedded:" << mDisplayedEmbedded + << " address:" << this; if ( mChild ) mChild->dump( chars + 1 ); if ( mNext ) diff --git a/partNode.h b/partNode.h index 1f8ff8243..c7e9a75b0 100644 --- a/partNode.h +++ b/partNode.h @@ -212,7 +212,7 @@ public: mMimePartTreeItem = item; } - KMMimePartTreeItem* mimePartTreeItem() { + KMMimePartTreeItem* mimePartTreeItem() const { return mMimePartTreeItem; } From 03bf5b079aa2dce4179d961424dc7af5f061a649 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 19:46:02 +0000 Subject: [PATCH 03/15] SVN_MERGE Merged revisions 1029646 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1029646 | winterz | 2009-09-30 14:41:34 +0200 (Wed, 30 Sep 2009) | 9 lines Merged revisions 1029611 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1029611 | mutz | 2009-09-30 07:13:51 -0400 (Wed, 30 Sep 2009) | 1 line CryptoBodyPartMemento: new base class for {Decrypt,Verify{Opaque,Detached}}BodyPartMemento ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033244 --- objecttreeparser_p.cpp | 72 +++++++++++++++++++++----------------- objecttreeparser_p.h | 78 ++++++++++++++++++------------------------ 2 files changed, 73 insertions(+), 77 deletions(-) diff --git a/objecttreeparser_p.cpp b/objecttreeparser_p.cpp index bbc38b706..b8e4bf1a7 100644 --- a/objecttreeparser_p.cpp +++ b/objecttreeparser_p.cpp @@ -48,14 +48,31 @@ using namespace KMail; using namespace Kleo; using namespace GpgME; -DecryptVerifyBodyPartMemento::DecryptVerifyBodyPartMemento( DecryptVerifyJob * job, const QByteArray & cipherText ) +CryptoBodyPartMemento::CryptoBodyPartMemento() : QObject( 0 ), Interface::BodyPartMemento(), ISubject(), - m_cipherText( cipherText ), - m_job( job ), m_running( false ) { + +} + +CryptoBodyPartMemento::~CryptoBodyPartMemento() {} + +void CryptoBodyPartMemento::setAuditLog( const Error & err, const QString & log ) { + m_auditLogError = err; + m_auditLog = log; +} + +void CryptoBodyPartMemento::setRunning( bool running ) { + m_running = running; +} + +DecryptVerifyBodyPartMemento::DecryptVerifyBodyPartMemento( DecryptVerifyJob * job, const QByteArray & cipherText ) + : CryptoBodyPartMemento(), + m_cipherText( cipherText ), + m_job( job ) +{ assert( m_job ); } @@ -72,14 +89,14 @@ bool DecryptVerifyBodyPartMemento::start() { } connect( m_job, SIGNAL(result(const GpgME::DecryptionResult&,const GpgME::VerificationResult&,const QByteArray&)), this, SLOT(slotResult(const GpgME::DecryptionResult&,const GpgME::VerificationResult&,const QByteArray&)) ); - m_running = true; + setRunning( true ); return true; } void DecryptVerifyBodyPartMemento::exec() { assert( m_job ); QByteArray plainText; - m_running = true; + setRunning( true ); const std::pair p = m_job->exec( m_cipherText, plainText ); saveResult( p.first, p.second, plainText ); m_job->deleteLater(); // exec'ed jobs don't delete themselves @@ -91,12 +108,11 @@ void DecryptVerifyBodyPartMemento::saveResult( const DecryptionResult & dr, const QByteArray & plainText ) { assert( m_job ); - m_running = false; + setRunning( false ); m_dr = dr; m_vr = vr; m_plainText = plainText; - m_auditLog = m_job->auditLogAsHtml(); - m_auditLogError = m_job->auditLogError(); + setAuditLog( m_job->auditLogError(), m_job->auditLogAsHtml() ); } void DecryptVerifyBodyPartMemento::slotResult( const DecryptionResult & dr, @@ -115,14 +131,11 @@ VerifyDetachedBodyPartMemento::VerifyDetachedBodyPartMemento( VerifyDetachedJob KeyListJob * klj, const QByteArray & signature, const QByteArray & plainText ) - : QObject( 0 ), - Interface::BodyPartMemento(), - ISubject(), + : CryptoBodyPartMemento(), m_signature( signature ), m_plainText( plainText ), m_job( job ), - m_keylistjob( klj ), - m_running( false ) + m_keylistjob( klj ) { assert( m_job ); } @@ -142,13 +155,13 @@ bool VerifyDetachedBodyPartMemento::start() { } connect( m_job, SIGNAL(result(const GpgME::VerificationResult&)), this, SLOT(slotResult(const GpgME::VerificationResult&)) ); - m_running = true; + setRunning( true ); return true; } void VerifyDetachedBodyPartMemento::exec() { assert( m_job ); - m_running = true; + setRunning( true ); saveResult( m_job->exec( m_signature, m_plainText ) ); m_job->deleteLater(); // exec'ed jobs don't delete themselves m_job = 0; @@ -161,7 +174,7 @@ void VerifyDetachedBodyPartMemento::exec() { if ( m_keylistjob ) m_keylistjob->deleteLater(); // exec'ed jobs don't delete themselves m_keylistjob = 0; - m_running = false; + setRunning( false ); } bool VerifyDetachedBodyPartMemento::canStartKeyListJob() const @@ -182,8 +195,7 @@ void VerifyDetachedBodyPartMemento::saveResult( const VerificationResult & vr ) { assert( m_job ); m_vr = vr; - m_auditLog = m_job->auditLogAsHtml(); - m_auditLogError = m_job->auditLogError(); + setAuditLog( m_job->auditLogError(), m_job->auditLogAsHtml() ); } void VerifyDetachedBodyPartMemento::slotResult( const VerificationResult & vr ) @@ -195,7 +207,7 @@ void VerifyDetachedBodyPartMemento::slotResult( const VerificationResult & vr ) if ( m_keylistjob ) m_keylistjob->deleteLater(); m_keylistjob = 0; - m_running = false; + setRunning( false ); QTimer::singleShot( 100, this, SLOT(notify()) ); } @@ -218,7 +230,7 @@ void VerifyDetachedBodyPartMemento::slotNextKey( const GpgME::Key & key ) void VerifyDetachedBodyPartMemento::slotKeyListJobDone() { m_keylistjob = 0; - m_running = false; + setRunning( false ); QTimer::singleShot( 100, this, SLOT(notify()) ); } @@ -226,13 +238,10 @@ void VerifyDetachedBodyPartMemento::slotKeyListJobDone() VerifyOpaqueBodyPartMemento::VerifyOpaqueBodyPartMemento( VerifyOpaqueJob * job, KeyListJob * klj, const QByteArray & signature ) - : QObject( 0 ), - Interface::BodyPartMemento(), - ISubject(), + : CryptoBodyPartMemento(), m_signature( signature ), m_job( job ), - m_keylistjob( klj ), - m_running( false ) + m_keylistjob( klj ) { assert( m_job ); } @@ -252,13 +261,13 @@ bool VerifyOpaqueBodyPartMemento::start() { } connect( m_job, SIGNAL(result(const GpgME::VerificationResult&,const QByteArray&)), this, SLOT(slotResult(const GpgME::VerificationResult&,const QByteArray&)) ); - m_running = true; + setRunning( true ); return true; } void VerifyOpaqueBodyPartMemento::exec() { assert( m_job ); - m_running = true; + setRunning( true ); QByteArray plainText; saveResult( m_job->exec( m_signature, plainText ), plainText ); m_job->deleteLater(); // exec'ed jobs don't delete themselves @@ -272,7 +281,7 @@ void VerifyOpaqueBodyPartMemento::exec() { if ( m_keylistjob ) m_keylistjob->deleteLater(); // exec'ed jobs don't delete themselves m_keylistjob = 0; - m_running = false; + setRunning( false ); } bool VerifyOpaqueBodyPartMemento::canStartKeyListJob() const @@ -295,8 +304,7 @@ void VerifyOpaqueBodyPartMemento::saveResult( const VerificationResult & vr, assert( m_job ); m_vr = vr; m_plainText = plainText; - m_auditLog = m_job->auditLogAsHtml(); - m_auditLogError = m_job->auditLogError(); + setAuditLog( m_job->auditLogError(), m_job->auditLogAsHtml() ); } void VerifyOpaqueBodyPartMemento::slotResult( const VerificationResult & vr, @@ -309,7 +317,7 @@ void VerifyOpaqueBodyPartMemento::slotResult( const VerificationResult & vr, if ( m_keylistjob ) m_keylistjob->deleteLater(); m_keylistjob = 0; - m_running = false; + setRunning( false ); QTimer::singleShot( 100, this, SLOT(notify()) ); } @@ -332,7 +340,7 @@ void VerifyOpaqueBodyPartMemento::slotNextKey( const GpgME::Key & key ) void VerifyOpaqueBodyPartMemento::slotKeyListJobDone() { m_keylistjob = 0; - m_running = false; + setRunning( false ); QTimer::singleShot( 100, this, SLOT(notify()) ); } diff --git a/objecttreeparser_p.h b/objecttreeparser_p.h index 85a1d1286..052813e40 100644 --- a/objecttreeparser_p.h +++ b/objecttreeparser_p.h @@ -54,37 +54,58 @@ class QStringList; namespace KMail { - class DecryptVerifyBodyPartMemento + class CryptoBodyPartMemento : public QObject, public KMail::Interface::BodyPartMemento, public KMail::ISubject { Q_OBJECT public: - DecryptVerifyBodyPartMemento( Kleo::DecryptVerifyJob * job, const QByteArray & cipherText ); - ~DecryptVerifyBodyPartMemento(); + CryptoBodyPartMemento(); + ~CryptoBodyPartMemento(); /* reimp */ Interface::Observer * asObserver() { return 0; } /* reimp */ Interface::Observable * asObservable() { return this; } + bool isRunning() const { return m_running; } + + const QString & auditLogAsHtml() const { return m_auditLog; } + GpgME::Error auditLogError() const { return m_auditLogError; } + + protected slots: + void notify() { + ISubject::notify(); + } + + protected: + void setAuditLog( const GpgME::Error & err, const QString & log ); + void setRunning( bool running ); + + private: + bool m_running; + QString m_auditLog; + GpgME::Error m_auditLogError; + }; + + class DecryptVerifyBodyPartMemento + : public CryptoBodyPartMemento + { + Q_OBJECT + public: + DecryptVerifyBodyPartMemento( Kleo::DecryptVerifyJob * job, const QByteArray & cipherText ); + ~DecryptVerifyBodyPartMemento(); + bool start(); void exec(); - bool isRunning() const { return m_running; } - const QByteArray & plainText() const { return m_plainText; } const GpgME::DecryptionResult & decryptResult() const { return m_dr; } const GpgME::VerificationResult & verifyResult() const { return m_vr; } - const QString & auditLogAsHtml() const { return m_auditLog; } - GpgME::Error auditLogError() const { return m_auditLogError; } private slots: void slotResult( const GpgME::DecryptionResult & dr, const GpgME::VerificationResult & vr, const QByteArray & plainText ); - void notify() { - ISubject::notify(); - } private: void saveResult( const GpgME::DecryptionResult &, @@ -94,20 +115,15 @@ namespace KMail { // input: const QByteArray m_cipherText; QPointer m_job; - bool m_running; // output: GpgME::DecryptionResult m_dr; GpgME::VerificationResult m_vr; QByteArray m_plainText; - QString m_auditLog; - GpgME::Error m_auditLogError; }; class VerifyDetachedBodyPartMemento - : public QObject, - public KMail::Interface::BodyPartMemento, - public KMail::ISubject + : public CryptoBodyPartMemento { Q_OBJECT public: @@ -117,26 +133,16 @@ namespace KMail { const QByteArray & plainText ); ~VerifyDetachedBodyPartMemento(); - /* reimp */ Interface::Observer * asObserver() { return 0; } - /* reimp */ Interface::Observable * asObservable() { return this; } - bool start(); void exec(); - bool isRunning() const { return m_running; } - const GpgME::VerificationResult & verifyResult() const { return m_vr; } - const QString & auditLogAsHtml() const { return m_auditLog; } - GpgME::Error auditLogError() const { return m_auditLogError; } const GpgME::Key & signingKey() const { return m_key; } private slots: void slotResult( const GpgME::VerificationResult & vr ); void slotKeyListJobDone(); void slotNextKey( const GpgME::Key & ); - void notify() { - ISubject::notify(); - } private: void saveResult( const GpgME::VerificationResult & ); @@ -149,19 +155,14 @@ namespace KMail { const QByteArray m_plainText; QPointer m_job; QPointer m_keylistjob; - bool m_running; // output: GpgME::VerificationResult m_vr; - QString m_auditLog; - GpgME::Error m_auditLogError; GpgME::Key m_key; }; class VerifyOpaqueBodyPartMemento - : public QObject, - public KMail::Interface::BodyPartMemento, - public KMail::ISubject + : public CryptoBodyPartMemento { Q_OBJECT public: @@ -170,18 +171,11 @@ namespace KMail { const QByteArray & signature ); ~VerifyOpaqueBodyPartMemento(); - /* reimp */ Interface::Observer * asObserver() { return 0; } - /* reimp */ Interface::Observable * asObservable() { return this; } - bool start(); void exec(); - bool isRunning() const { return m_running; } - const QByteArray & plainText() const { return m_plainText; } const GpgME::VerificationResult & verifyResult() const { return m_vr; } - const QString & auditLogAsHtml() const { return m_auditLog; } - GpgME::Error auditLogError() const { return m_auditLogError; } const GpgME::Key & signingKey() const { return m_key; } private slots: @@ -189,9 +183,6 @@ namespace KMail { const QByteArray & plainText ); void slotKeyListJobDone(); void slotNextKey( const GpgME::Key & ); - void notify() { - ISubject::notify(); - } private: void saveResult( const GpgME::VerificationResult &, @@ -204,12 +195,9 @@ namespace KMail { const QByteArray m_signature; QPointer m_job; QPointer m_keylistjob; - bool m_running; // output: GpgME::VerificationResult m_vr; QByteArray m_plainText; - QString m_auditLog; - GpgME::Error m_auditLogError; GpgME::Key m_key; }; From 13ca9f7b583e86096df5bb87e378111032dd423d Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 19:49:20 +0000 Subject: [PATCH 04/15] SVN_MERGE Merged revisions 1029649 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1029649 | winterz | 2009-09-30 14:50:51 +0200 (Wed, 30 Sep 2009) | 12 lines Merged revisions 1029626 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1029626 | mutz | 2009-09-30 08:00:03 -0400 (Wed, 30 Sep 2009) | 4 lines ISubject: iterate over a copy of the observerlist This prevents corruption of the iterators when attach() or detach() is called (indirectly) through one of our Observer::update() calls ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033245 --- isubject.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/isubject.cpp b/isubject.cpp index b2ec6b2d1..2f97ac583 100644 --- a/isubject.cpp +++ b/isubject.cpp @@ -25,14 +25,14 @@ namespace KMail { void ISubject::notify() { - for ( QVector::iterator it = mObserverList.begin() ; it != mObserverList.end() ; ++it ) - { - if ( (*it) ) - { + // iterate over a copy (to prevent crashes when + // {attach(),detach()} is called from an Observer::update() + const QVector copy = mObserverList; + for ( QVector::const_iterator it = copy.begin() ; it != copy.end() ; ++it ) { + if ( (*it) ) { (*it)->update( this ); } } } - } From 4c5446fb961e7be5463ce57bc1e4dbb1bc21ca4c Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 19:57:03 +0000 Subject: [PATCH 05/15] SVN_MERGE Merged revisions 1029688 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1029688 | winterz | 2009-09-30 16:41:36 +0200 (Wed, 30 Sep 2009) | 9 lines Merged revisions 1029664 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1029664 | mutz | 2009-09-30 09:26:53 -0400 (Wed, 30 Sep 2009) | 1 line KMReaderWin::objectTreeToDecryptedMsg: simplify ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033248 --- kmreaderwin.cpp | 107 ++++-------------------------------------------- 1 file changed, 9 insertions(+), 98 deletions(-) diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index 86498191f..269b565f1 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -176,57 +176,18 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, kDebug() << "-------------------------------------------------"; kDebug() << "START" << "(" << recCount << ")"; if( node ) { + + kDebug(5006) << node->typeString() << '/' << node->subTypeString(); + partNode* curNode = node; partNode* dataNode = curNode; partNode * child = node->firstChild(); - bool bIsMultipart = false; - - switch( curNode->type() ){ - case DwMime::kTypeText: { - kDebug() << "* text *"; - switch( curNode->subType() ){ - case DwMime::kSubtypeHtml: - kDebug() << "html"; - break; - case DwMime::kSubtypeXVCard: - kDebug() << "v-card"; - break; - case DwMime::kSubtypeRichtext: - kDebug() << "rich text"; - break; - case DwMime::kSubtypeEnriched: - kDebug() << "enriched"; - break; - case DwMime::kSubtypePlain: - kDebug() << "plain"; - break; - default: - kDebug() << "default"; - break; - } - } - break; + const bool bIsMultipart = node->type() == DwMime::kTypeMultipart; + + switch( curNode->type() ) { case DwMime::kTypeMultipart: { - kDebug() << "* multipart *"; - bIsMultipart = true; - switch( curNode->subType() ){ - case DwMime::kSubtypeMixed: - kDebug() << "mixed"; - break; - case DwMime::kSubtypeAlternative: - kDebug() << "alternative"; - break; - case DwMime::kSubtypeDigest: - kDebug() << "digest"; - break; - case DwMime::kSubtypeParallel: - kDebug() << "parallel"; - break; - case DwMime::kSubtypeSigned: - kDebug() << "signed"; - break; + switch( curNode->subType() ) { case DwMime::kSubtypeEncrypted: { - kDebug() << "encrypted"; if ( child ) { /* ATTENTION: This code is to be replaced by the new 'auto-detect' feature. -------------------------------------- @@ -240,17 +201,12 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, } } break; - default : - kDebug() << "( unknown subtype )"; - break; } } break; case DwMime::kTypeMessage: { - kDebug() << "* message *"; - switch( curNode->subType() ){ + switch( curNode->subType() ) { case DwMime::kSubtypeRfc822: { - kDebug() << "RfC 822"; if ( child ) dataNode = child; } @@ -259,25 +215,13 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, } break; case DwMime::kTypeApplication: { - kDebug() << "* application *"; - switch( curNode->subType() ){ - case DwMime::kSubtypePostscript: - kDebug() << "postscript"; - break; + switch( curNode->subType() ) { case DwMime::kSubtypeOctetStream: { - kDebug() << "octet stream"; if ( child ) dataNode = child; } break; - case DwMime::kSubtypePgpEncrypted: - kDebug() << "pgp encrypted"; - break; - case DwMime::kSubtypePgpSignature: - kDebug() << "pgp signed"; - break; case DwMime::kSubtypePkcs7Mime: { - kDebug() << "pkcs7 mime"; // note: subtype Pkcs7Mime can also be signed // and we do NOT want to remove the signature! if ( child && curNode->encryptionState() != KMMsgNotEncrypted ) @@ -287,39 +231,6 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, } } break; - case DwMime::kTypeImage: { - kDebug() << "* image *"; - switch( curNode->subType() ){ - case DwMime::kSubtypeJpeg: - kDebug() << "JPEG"; - break; - case DwMime::kSubtypeGif: - kDebug() << "GIF"; - break; - } - } - break; - case DwMime::kTypeAudio: { - kDebug() << "* audio *"; - switch( curNode->subType() ){ - case DwMime::kSubtypeBasic: - kDebug() << "basic"; - break; - } - } - break; - case DwMime::kTypeVideo: { - kDebug() << "* video *"; - switch( curNode->subType() ){ - case DwMime::kSubtypeMpeg: - kDebug() << "mpeg"; - break; - } - } - break; - case DwMime::kTypeModel: - kDebug() << "* model *"; - break; } From d4cf29b600dff27eea1cc82b8e8b04b940664e28 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 20:03:50 +0000 Subject: [PATCH 06/15] SVN_MERGE Merged revisions 1030009 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1030009 | winterz | 2009-10-01 13:37:05 +0200 (Thu, 01 Oct 2009) | 11 lines Merged revisions 1029974 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1029974 | mutz | 2009-10-01 05:40:05 -0400 (Thu, 01 Oct 2009) | 3 lines {Decrypt,Verify{Opaque,Detached}}BodyPartMemento: call notify() directly, not through a single-shot timer This is now prevented by the copying the list of observers in ISubject::notify() before iterating ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033252 --- objecttreeparser_p.cpp | 10 +++++----- objecttreeparser_p.h | 5 ----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/objecttreeparser_p.cpp b/objecttreeparser_p.cpp index b8e4bf1a7..41d0f2a8b 100644 --- a/objecttreeparser_p.cpp +++ b/objecttreeparser_p.cpp @@ -121,7 +121,7 @@ void DecryptVerifyBodyPartMemento::slotResult( const DecryptionResult & dr, { saveResult( dr, vr, plainText ); m_job = 0; - QTimer::singleShot( 100, this, SLOT(notify()) ); + notify(); } @@ -208,7 +208,7 @@ void VerifyDetachedBodyPartMemento::slotResult( const VerificationResult & vr ) m_keylistjob->deleteLater(); m_keylistjob = 0; setRunning( false ); - QTimer::singleShot( 100, this, SLOT(notify()) ); + notify(); } bool VerifyDetachedBodyPartMemento::startKeyListJob() @@ -231,7 +231,7 @@ void VerifyDetachedBodyPartMemento::slotKeyListJobDone() { m_keylistjob = 0; setRunning( false ); - QTimer::singleShot( 100, this, SLOT(notify()) ); + notify(); } @@ -318,7 +318,7 @@ void VerifyOpaqueBodyPartMemento::slotResult( const VerificationResult & vr, m_keylistjob->deleteLater(); m_keylistjob = 0; setRunning( false ); - QTimer::singleShot( 100, this, SLOT(notify()) ); + notify(); } bool VerifyOpaqueBodyPartMemento::startKeyListJob() @@ -341,7 +341,7 @@ void VerifyOpaqueBodyPartMemento::slotKeyListJobDone() { m_keylistjob = 0; setRunning( false ); - QTimer::singleShot( 100, this, SLOT(notify()) ); + notify(); } diff --git a/objecttreeparser_p.h b/objecttreeparser_p.h index 052813e40..18ba33b40 100644 --- a/objecttreeparser_p.h +++ b/objecttreeparser_p.h @@ -72,11 +72,6 @@ namespace KMail { const QString & auditLogAsHtml() const { return m_auditLog; } GpgME::Error auditLogError() const { return m_auditLogError; } - protected slots: - void notify() { - ISubject::notify(); - } - protected: void setAuditLog( const GpgME::Error & err, const QString & log ); void setRunning( bool running ); From 0363634e041b85a9592351926e7af7bb1a590f09 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 20:17:46 +0000 Subject: [PATCH 07/15] SVN_MERGE Merged revisions 1030121 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1030121 | winterz | 2009-10-01 17:59:09 +0200 (Thu, 01 Oct 2009) | 11 lines Merged revisions 1030101 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1030101 | mutz | 2009-10-01 11:23:09 -0400 (Thu, 01 Oct 2009) | 3 lines KMReaderWin::objectTreeToDecryptedMsg: fix for PGP/MIME messages (and probably S/MIME message with mp/encrypted, but I haven't seen those anywhere yet - KMail certainly doesn't create them) ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033259 --- kmreaderwin.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index 269b565f1..c4e4d3106 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -188,17 +188,8 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, case DwMime::kTypeMultipart: { switch( curNode->subType() ) { case DwMime::kSubtypeEncrypted: { - if ( child ) { - /* - ATTENTION: This code is to be replaced by the new 'auto-detect' feature. -------------------------------------- - */ - partNode* data = - child->findType( DwMime::kTypeApplication, DwMime::kSubtypeOctetStream, false, true ); - if ( !data ) - data = child->findType( DwMime::kTypeApplication, DwMime::kSubtypePkcs7Mime, false, true ); - if ( data && data->firstChild() ) - dataNode = data; - } + if ( child ) + dataNode = child; } break; } From 6601ee2e97a66c779f7882c9b231cf096d6ac527 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 20:24:39 +0000 Subject: [PATCH 08/15] Merged revisions 1030122 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1030122 | winterz | 2009-10-01 18:00:24 +0200 (Thu, 01 Oct 2009) | 11 lines Merged revisions 1030105 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1030105 | mutz | 2009-10-01 11:26:23 -0400 (Thu, 01 Oct 2009) | 3 lines KMReaderWin::objectTreeToDecryptedMsg: fix S/MIME signatures being invalidated by the process of stripping the encryption This is very likely an incomplete fix. ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033264 --- kmreaderwin.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index c4e4d3106..04bf94e4d 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -183,10 +183,15 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, partNode* dataNode = curNode; partNode * child = node->firstChild(); const bool bIsMultipart = node->type() == DwMime::kTypeMultipart; + bool bKeepPartAsIs = false; switch( curNode->type() ) { case DwMime::kTypeMultipart: { switch( curNode->subType() ) { + case DwMime::kSubtypeSigned: { + bKeepPartAsIs = true; + } + break; case DwMime::kSubtypeEncrypted: { if ( child ) dataNode = child; @@ -212,6 +217,12 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, dataNode = child; } break; + case DwMime::kSubtypePkcs7Signature: { + // note: subtype Pkcs7Signature specifies a signature part + // which we do NOT want to remove! + bKeepPartAsIs = true; + } + break; case DwMime::kSubtypePkcs7Mime: { // note: subtype Pkcs7Mime can also be signed // and we do NOT want to remove the signature! @@ -259,6 +270,10 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, } } + if ( bKeepPartAsIs ) { + resultingData += dataNode->encodedBody(); + } else { + // B) Store the body of this part. if( headers && bIsMultipart && dataNode->firstChild() ) { kDebug() << "is valid Multipart, processing children:"; @@ -294,6 +309,7 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, kDebug() << "is Simple part or invalid Multipart, storing body data .. DONE"; resultingData += part->Body().AsString().c_str(); } + } } else { kDebug() << "dataNode != curNode: Replace curNode by dataNode."; bool rootNodeReplaceFlag = weAreReplacingTheRootNode || !curNode->parentNode(); From fbecc0d452d67480aba4d980036c0c5c336d7bf5 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 20:26:23 +0000 Subject: [PATCH 09/15] SVN_SILENT fix indentation svn path=/trunk/KDE/kdepim/; revision=1033267 --- kmreaderwin.cpp | 68 ++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index 04bf94e4d..676950e4f 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -194,7 +194,7 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, break; case DwMime::kSubtypeEncrypted: { if ( child ) - dataNode = child; + dataNode = child; } break; } @@ -271,44 +271,44 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, } if ( bKeepPartAsIs ) { - resultingData += dataNode->encodedBody(); + resultingData += dataNode->encodedBody(); } else { - // B) Store the body of this part. - if( headers && bIsMultipart && dataNode->firstChild() ) { - kDebug() << "is valid Multipart, processing children:"; - QByteArray boundary = headers->ContentType().Boundary().c_str(); - curNode = dataNode->firstChild(); - // store children of multipart - while( curNode ) { - kDebug() << "--boundary"; - if( resultingData.size() && - ( '\n' != resultingData.at( resultingData.size()-1 ) ) ) + // B) Store the body of this part. + if( headers && bIsMultipart && dataNode->firstChild() ) { + kDebug() << "is valid Multipart, processing children:"; + QByteArray boundary = headers->ContentType().Boundary().c_str(); + curNode = dataNode->firstChild(); + // store children of multipart + while( curNode ) { + kDebug() << "--boundary"; + if( resultingData.size() && + ( '\n' != resultingData.at( resultingData.size()-1 ) ) ) + resultingData += '\n'; + resultingData += '\n'; + resultingData += "--"; + resultingData += boundary; resultingData += '\n'; - resultingData += '\n'; - resultingData += "--"; + // note: We are processing a harmless multipart that is *not* + // to be replaced by one of it's children, therefor + // we set their doStoreHeaders to true. + objectTreeToDecryptedMsg( curNode, + resultingData, + theMessage, + false, + recCount + 1 ); + curNode = curNode->nextSibling(); + } + kDebug() << "--boundary--"; + resultingData += "\n--"; resultingData += boundary; - resultingData += '\n'; - // note: We are processing a harmless multipart that is *not* - // to be replaced by one of it's children, therefor - // we set their doStoreHeaders to true. - objectTreeToDecryptedMsg( curNode, - resultingData, - theMessage, - false, - recCount + 1 ); - curNode = curNode->nextSibling(); + resultingData += "--\n\n"; + kDebug() << "Multipart processing children - DONE"; + } else if( part ){ + // store simple part + kDebug() << "is Simple part or invalid Multipart, storing body data .. DONE"; + resultingData += part->Body().AsString().c_str(); } - kDebug() << "--boundary--"; - resultingData += "\n--"; - resultingData += boundary; - resultingData += "--\n\n"; - kDebug() << "Multipart processing children - DONE"; - } else if( part ){ - // store simple part - kDebug() << "is Simple part or invalid Multipart, storing body data .. DONE"; - resultingData += part->Body().AsString().c_str(); - } } } else { kDebug() << "dataNode != curNode: Replace curNode by dataNode."; From 77fe7589aae6fceb5f8d2acc79cae0db937affb1 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 20:34:53 +0000 Subject: [PATCH 10/15] SVN_MERGE Merged revisions 1030133 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1030133 | winterz | 2009-10-01 18:34:33 +0200 (Thu, 01 Oct 2009) | 11 lines Merged revisions 1030111 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1030111 | mutz | 2009-10-01 11:29:37 -0400 (Thu, 01 Oct 2009) | 3 lines KMReaderWin fix the trigger conditions for the store-unencrypted feature The old trigger guard was invalidated when the explicit-decrypt feature made every mail be already marked as read when this function was finally called. ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033272 --- kmreaderwin.cpp | 124 ++++++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 58 deletions(-) diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index 676950e4f..cb32d9b35 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -1539,6 +1539,13 @@ void KMReaderWin::displayMessage() { QTimer::singleShot( 1, this, SLOT(injectAttachments()) ); } +static bool message_was_saved_decrypted_before( const KMMessage * msg ) +{ + if ( !msg ) + return false; + kDebug() << "msgId =" << msg->msgId(); + return msg->msgId().trimmed().startsWith( " All received encrypted messages *must* be stored in unencrypted form - // after they have been decrypted once the user has read them. - // ( "Aufhebung der Verschluesselung nach dem Lesen" ) - // - // note: Since there is no configuration option for this, we do that for - // all kinds of encryption now - *not* just for S/MIME. - // This could be changed in the objectTreeToDecryptedMsg() function - // by deciding when (or when not, resp.) to set the 'dataNode' to - // something different than 'curNode'. - - -kDebug() << "\n\n\nSpecial post-encryption handling:\n1."; -kDebug() << "(aMsg == msg) =" << (aMsg == message()); -kDebug() << " mLastStatus.isOfUnknownStatus() =" << mLastStatus.isOfUnknownStatus(); -kDebug() << "|| mLastStatus.isNew() =" << mLastStatus.isNew(); -kDebug() << "|| mLastStatus.isUnread) =" << mLastStatus.isUnread(); -kDebug() << "(mIdOfLastViewedMessage != aMsg->msgId()) =" << (mIdOfLastViewedMessage != aMsg->msgId()); -kDebug() << " (KMMsgFullyEncrypted == encryptionState) =" << (KMMsgFullyEncrypted == encryptionState); -kDebug() << "|| (KMMsgPartiallyEncrypted == encryptionState) =" << (KMMsgPartiallyEncrypted == encryptionState); + // Hack to make sure the S/MIME CryptPlugs follows the strict requirement + // of german government: + // --> All received encrypted messages *must* be stored in unencrypted form + // after they have been decrypted once the user has read them. + // ( "Aufhebung der Verschluesselung nach dem Lesen" ) + // + // note: Since there is no configuration option for this, we do that for + // all kinds of encryption now - *not* just for S/MIME. + // This could be changed in the objectTreeToDecryptedMsg() function + // by deciding when (or when not, resp.) to set the 'dataNode' to + // something different than 'curNode'. + + + kDebug() << "\n\n\nSpecial post-encryption handling:\n1."; + kDebug() << "(aMsg == msg) =" << (aMsg == message()); + kDebug() << "aMsg->parent() && aMsg->parent() != kmkernel->outboxFolder() = " << (aMsg->parent() && aMsg->parent() != kmkernel->outboxFolder()); + kDebug() << "message_was_saved_decrypted_before( aMsg ) = " << message_was_saved_decrypted_before( aMsg ); + kDebug() << "this->decryptMessage() = " << decryptMessage(); + kDebug() << "otp.hasPendingAsyncJobs() = " << otp.hasPendingAsyncJobs(); + kDebug() << " (KMMsgFullyEncrypted == encryptionState) = " << (KMMsgFullyEncrypted == encryptionState); + kDebug() <<"|| (KMMsgPartiallyEncrypted == encryptionState) =" << (KMMsgPartiallyEncrypted == encryptionState); // only proceed if we were called the normal way - not by // double click on the message (==not running in a separate window) - if( (aMsg == message()) - // only proceed if this message was not saved encryptedly before - // to make sure only *new* messages are saved in decrypted form - && ( mLastStatus.isOfUnknownStatus() - || mLastStatus.isNew() - || mLastStatus.isUnread() ) - // avoid endless recursions - && (mIdOfLastViewedMessage != aMsg->msgId()) - // only proceed if this message is (at least partially) encrypted - && ( (KMMsgFullyEncrypted == encryptionState) - || (KMMsgPartiallyEncrypted == encryptionState) ) ) { - - kDebug() << "Calling objectTreeToDecryptedMsg()"; - - QByteArray decryptedData; - // note: The following call may change the message's headers. - objectTreeToDecryptedMsg( mRootNode, decryptedData, *aMsg ); - kDebug() << "Resulting data:" << decryptedData; - - if( !decryptedData.isEmpty() ) { - kDebug() << "Composing unencrypted message"; - // try this: - aMsg->setBody( decryptedData ); - KMMessage* unencryptedMessage = new KMMessage( *aMsg ); - unencryptedMessage->setParent( 0 ); - // because this did not work: - /* - DwMessage dwMsg( DwString( aMsg->asString() ) ); - dwMsg.Body() = DwBody( DwString( resultString.data() ) ); - dwMsg.Body().Parse(); - KMMessage* unencryptedMessage = new KMMessage( &dwMsg ); - */ - kDebug() << "Resulting message:" << unencryptedMessage->asString(); - kDebug() << "Attach unencrypted message to aMsg"; - aMsg->setUnencryptedMsg( unencryptedMessage ); - emitReplaceMsgByUnencryptedVersion = true; + if( (aMsg == message()) + // don't remove encryption in the outbox folder :) + && ( aMsg->parent() && aMsg->parent() != kmkernel->outboxFolder() ) + // only proceed if this message was not saved encryptedly before + && !message_was_saved_decrypted_before( aMsg ) + // only proceed if the message has actually been decrypted + && decryptMessage() + // only proceed if no pending async jobs are running: + && !otp.hasPendingAsyncJobs() + // only proceed if this message is (at least partially) encrypted + && ( (KMMsgFullyEncrypted == encryptionState) + || (KMMsgPartiallyEncrypted == encryptionState) ) ) { + + kDebug() << "Calling objectTreeToDecryptedMsg()"; + + QByteArray decryptedData; + // note: The following call may change the message's headers. + objectTreeToDecryptedMsg( mRootNode, decryptedData, *aMsg ); + kDebug() << "Resulting data:" << decryptedData; + + if( !decryptedData.isEmpty() ) { + kDebug() << "Composing unencrypted message"; + // try this: + aMsg->setBody( decryptedData ); + KMMessage* unencryptedMessage = new KMMessage( *aMsg ); + unencryptedMessage->setParent( 0 ); + // because this did not work: + /* + DwMessage dwMsg( DwString( aMsg->asString() ) ); + dwMsg.Body() = DwBody( DwString( resultString.data() ) ); + dwMsg.Body().Parse(); + KMMessage* unencryptedMessage = new KMMessage( &dwMsg ); + */ + kDebug() << "Resulting message:" << unencryptedMessage->asString(); + kDebug() << "Attach unencrypted message to aMsg"; + aMsg->setUnencryptedMsg( unencryptedMessage ); + emitReplaceMsgByUnencryptedVersion = true; + } } } - } // store message id to avoid endless recursions setIdOfLastViewedMessage( aMsg->msgId() ); From e9275849f6db96ccbfacee84b511ba8317ac0555 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 9 Oct 2009 20:38:10 +0000 Subject: [PATCH 11/15] Merged revisions 1030134 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r1030134 | winterz | 2009-10-01 18:41:43 +0200 (Thu, 01 Oct 2009) | 9 lines Merged revisions 1030112 via svnmerge from https://svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r1030112 | mutz | 2009-10-01 11:30:44 -0400 (Thu, 01 Oct 2009) | 1 line KMReaderWin: remove now-unused mLastStatus member ........ ................ svn path=/trunk/KDE/kdepim/; revision=1033274 --- kmreaderwin.cpp | 4 ---- kmreaderwin.h | 1 - 2 files changed, 5 deletions(-) diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index cb32d9b35..877650a89 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -448,7 +448,6 @@ KMReaderWin::KMReaderWin(QWidget *aParent, mLastSerNum = 0; mWaitingForSerNum = 0; mMessage = 0; - mLastStatus.clear(); mMsgDisplay = true; mPrinting = false; mAtmUpdate = false; @@ -1251,14 +1250,11 @@ void KMReaderWin::setMsg( KMMessage* aMsg, bool force ) if (aMsg) { aMsg->setOverrideCodec( overrideCodec() ); aMsg->setDecodeHTML( htmlMail() ); - mLastStatus = aMsg->status(); // FIXME: workaround to disable DND for IMAP load-on-demand if ( !aMsg->isComplete() ) mViewer->setDNDEnabled( false ); else mViewer->setDNDEnabled( true ); - } else { - mLastStatus.clear(); } // only display the msg if it is complete diff --git a/kmreaderwin.h b/kmreaderwin.h index a4c7269ac..6864e3d82 100644 --- a/kmreaderwin.h +++ b/kmreaderwin.h @@ -606,7 +606,6 @@ private: bool mMsgDisplay; bool mNoMDNsWhenEncrypted; unsigned long mLastSerNum; - MessageStatus mLastStatus; KMail::CSSHelper * mCSSHelper; bool mUseFixedFont; From a28885d18d31c9136458d3b375d564670011f67f Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 9 Oct 2009 20:57:59 +0000 Subject: [PATCH 12/15] Fix typo svn path=/trunk/KDE/kdepim/; revision=1033284 --- folderselectiontreewidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folderselectiontreewidget.h b/folderselectiontreewidget.h index 912431cd4..787463e52 100644 --- a/folderselectiontreewidget.h +++ b/folderselectiontreewidget.h @@ -68,7 +68,7 @@ public: * Reload the tree and select which folders to show and which not * * @param mustBeReadWrite If true, the read-only folders become non selectable - * @param showOutbox If trye, the otbox folder is shown + * @param showOutbox If true, the outbox folder is shown * @param showImapFolders Whether to show the IMAP folder hierarchy * @param preSelection The initial folder to select */ From ba19b6ce98d95b4468cdbb7469f0fc944864f9d3 Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Sun, 11 Oct 2009 09:43:34 +0000 Subject: [PATCH 13/15] SVN_SILENT made messages (.desktop file) svn path=/trunk/KDE/kdepim/examples/mailreader/; revision=1033828 --- kmail.notifyrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmail.notifyrc b/kmail.notifyrc index e339c5421..3e54e93b5 100644 --- a/kmail.notifyrc +++ b/kmail.notifyrc @@ -61,6 +61,7 @@ Comment[zh_TW]=KMail 郵件軟體 [Event/mail-check-error] Name=Error While Checking Mail +Name[en_GB]=Error While Checking Mail Name[es]=Error al comprobar el correo Name[gl]=Produciuse un erro ao comprobar o correo Name[nb]=Feil under sjekking av e-post @@ -75,6 +76,7 @@ Name[uk]=Помилка під час спроби отримання пошти Name[x-test]=xxError While Checking Mailxx Name[zh_TW]=檢查郵件時發生錯誤 Comment=There was an error while checking for new mail +Comment[en_GB]=There was an error while checking for new mail Comment[es]=Ha ocurrido un error mientras se comprobaba el correo nuevo Comment[gl]=Aconteceu un erro cando se comprobaba o correo novo Comment[nb]=Det oppsto en feil mens det ble sett etter ny e-post From 0aa6c561f54ac13294aba57705a84be080122724 Mon Sep 17 00:00:00 2001 From: Martin Koller Date: Sun, 11 Oct 2009 21:50:43 +0000 Subject: [PATCH 14/15] BUG: 160215 On smart-reply, use the ReplyAll template only when it's a reply to a mailing list svn path=/trunk/KDE/kdepim/; revision=1034077 --- kmmessage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kmmessage.cpp b/kmmessage.cpp index 331134c2e..5773e1c19 100644 --- a/kmmessage.cpp +++ b/kmmessage.cpp @@ -618,8 +618,10 @@ KMMessage* KMMessage::createReply( ReplyStrategy replyStrategy, toStr = headerField( "Mail-Followup-To" ); } else if ( !replyToStr.isEmpty() ) { - // assume a Reply-To header mangling mailing list toStr = replyToStr; + // use the ReplyAll template only when it's a reply to a mailing list + if ( mailingListAddresses.isEmpty() ) + replyAll = false; } else if ( !mailingListAddresses.isEmpty() ) { toStr = mailingListAddresses[0]; From ae7d2ee166230f07001c92465b4150c2bf5b3319 Mon Sep 17 00:00:00 2001 From: Andrew Coles Date: Mon, 12 Oct 2009 13:36:35 +0000 Subject: [PATCH 15/15] Proof-reading messages. svn path=/trunk/KDE/kdepim/; revision=1034337 --- callback.cpp | 4 ++-- kmail.kcfg.cmake | 4 ++-- kmfilteraction.cpp | 10 +++++----- kmfolderdialog.cpp | 4 ++-- ui/accountspagereceivingtab.ui | 2 +- ui/imapsettings.ui | 2 +- util.cpp | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/callback.cpp b/callback.cpp index 85993d03f..40134e452 100644 --- a/callback.cpp +++ b/callback.cpp @@ -75,10 +75,10 @@ QString Callback::askForTransport( bool nullIdentity ) const QString text; if ( nullIdentity ) - text = i18n( "The receiver of this invitation doesn't match any of your identities.
" + text = i18n( "The receiver of this invitation does not match any of your identities.
" "Please select the transport which should be used to send your reply.
" ); else - text = i18n( "The identity matching the receiver of this invitation doesn't have an " + text = i18n( "The identity matching the receiver of this invitation does not have an " "associated transport configured.
" "Please select the transport which should be used to send your reply.
"); bool ok; diff --git a/kmail.kcfg.cmake b/kmail.kcfg.cmake index c2c3505fb..41e47902b 100644 --- a/kmail.kcfg.cmake +++ b/kmail.kcfg.cmake @@ -152,7 +152,7 @@ ${MAILDIR_FILENAME_SEPARATOR} @@ -307,7 +307,7 @@ ${ALLOW_SEMICOLON_AS_ADDRESS_SEPARATOR_DEFAULT} - + diff --git a/kmfilteraction.cpp b/kmfilteraction.cpp index 2451a9cd1..2c005c5e4 100644 --- a/kmfilteraction.cpp +++ b/kmfilteraction.cpp @@ -2237,11 +2237,11 @@ KMFilterAction::ReturnCode KMFilterActionAddToAddressBook::process( KMMessage* m } if ( !ab->save( ticket ) ) { - ab->error( i18n( "Can't save new addresses to address book." ) ); + ab->error( i18n( "Cannot save new addresses to address book." ) ); return ErrorButGoOn; } } else { - ab->error( i18n( "Can't save to address book. Address book is locked." ) ); + ab->error( i18n( "Cannot save to address book: address book is locked." ) ); return ErrorButGoOn; } @@ -2265,13 +2265,13 @@ QWidget* KMFilterActionAddToAddressBook::createParamWidget( QWidget* parent ) co le->setObjectName( "ledit" ); gridlayout->addWidget( le, 0, 2 ); - l = new QLabel( i18n( "in addressbook" ), w ); + l = new QLabel( i18n( "in address book" ), w ); gridlayout->addWidget( l, 1, 1 ); KComboBox *cbAdressBook = new KComboBox( w ); cbAdressBook->setObjectName( "AddressBookCombo" ); - cbAdressBook->setToolTip( i18n( "

This defines the preferred addressbook.
" - "If it is not accessible, the filter will fallback to the default addressbook.

" ) ); + cbAdressBook->setToolTip( i18n( "

This defines the preferred address book.
" + "If it is not accessible, the filter will fallback to the default address book.

" ) ); cbAdressBook->setInsertPolicy( QComboBox::InsertAtBottom ); gridlayout->addWidget( cbAdressBook, 1, 2 ); diff --git a/kmfolderdialog.cpp b/kmfolderdialog.cpp index 93cf9e8ce..8190e3c36 100644 --- a/kmfolderdialog.cpp +++ b/kmfolderdialog.cpp @@ -443,8 +443,8 @@ KMail::FolderDialogGeneralTab::FolderDialogGeneralTab( KMFolderDialog* dlg, mHideInSelectionDialogCheckBox = new QCheckBox( i18n( "Hide this folder in the folder selection dialog" ), this ); mHideInSelectionDialogCheckBox->setWhatsThis( - i18nc( "@info:whatsthis", "Check this option if you do not want that this folder " - "is shown in the folder selection dialogs, like the " + i18nc( "@info:whatsthis", "Check this option if you do not want this folder " + "to be shown in folder selection dialogs, such as the " "Jump to Folder dialog." ) ); hbl->addWidget( mHideInSelectionDialogCheckBox ); hbl->addStretch( 1 ); diff --git a/ui/accountspagereceivingtab.ui b/ui/accountspagereceivingtab.ui index 2488bdbd5..2a05e8575 100644 --- a/ui/accountspagereceivingtab.ui +++ b/ui/accountspagereceivingtab.ui @@ -122,7 +122,7 @@ - Show for each folder the number of newly arrived messages + Show for each folder the number of newly arrived messages Deta&iled new mail notification diff --git a/ui/imapsettings.ui b/ui/imapsettings.ui index 8c481cc71..b1eb7bf92 100644 --- a/ui/imapsettings.ui +++ b/ui/imapsettings.ui @@ -258,7 +258,7 @@ However, if KWallet is not available, the password will be stored in KMail's con - Show only serverside s&ubscribed folders + Show only server-side s&ubscribed folders diff --git a/util.cpp b/util.cpp index bf0a46c69..a9b8918a7 100644 --- a/util.cpp +++ b/util.cpp @@ -140,7 +140,7 @@ bool KMail::Util::validateAddresses( QWidget *parent, const QString &addresses ) KPIMUtils::isValidAddressList( StringUtil::expandAliases( addresses,distributionListEmpty ), brokenAddress ); if ( !distributionListEmpty.isEmpty() ) { - QString errorMsg = i18n( "Distribution list \"%1\" is empty. You can not use it.", distributionListEmpty.join( ", " ) ); + QString errorMsg = i18n( "Distribution list \"%1\" is empty, it cannot be used.", distributionListEmpty.join( ", " ) ); KMessageBox::sorry( parent , errorMsg, i18n("Invalid Email Address") ); return false; }