diff --git a/kmfoldertree.cpp b/kmfoldertree.cpp index 6e918bbfc..a62bf61bc 100644 --- a/kmfoldertree.cpp +++ b/kmfoldertree.cpp @@ -124,7 +124,7 @@ QPixmap KMFolderTreeItem::normalIcon(int size) const switch ( type() ) { case Inbox: icon = "folder-inbox"; break; case Outbox: icon = "folder-outbox"; break; - case SentMail: icon = "folder-sent_mail"; break; + case SentMail: icon = "folder-sent-mail"; break; case Trash: icon = "user-trash"; break; case Drafts: icon = "edit"; break; case Templates: icon = "document-new"; break; diff --git a/kmsender.cpp b/kmsender.cpp index 715b19956..2b2ed9955 100644 --- a/kmsender.cpp +++ b/kmsender.cpp @@ -253,9 +253,9 @@ bool KMSender::doSendQueued( const QString &customTransport ) } //----------------------------------------------------------------------------- -void KMSender::emitProgressInfo( int currentFileProgress ) +void KMSender::slotProcessedSize( KJob *, qulonglong size ) { - int percent = (mTotalBytes) ? ( 100 * (mSentBytes+currentFileProgress) / mTotalBytes ) : 0; + int percent = (mTotalBytes) ? ( 100 * (mSentBytes+size) / mTotalBytes ) : 0; if (percent > 100) percent = 100; mProgressItem->setProgress(percent); } @@ -594,6 +594,8 @@ void KMSender::doSendMsg() mTransportJob->setData( message ); connect( mTransportJob, SIGNAL(result(KJob*)), SLOT(slotResult(KJob*)) ); + connect( mTransportJob, SIGNAL(processedSize(KJob *, qulonglong)), + SLOT( slotProcessedSize(KJob *, qulonglong)) ); mSendProcStarted = true; mTransportJob->start(); } diff --git a/kmsender.h b/kmsender.h index 9a997a781..db9fd37e4 100644 --- a/kmsender.h +++ b/kmsender.h @@ -96,12 +96,13 @@ private: /** sets replied/forwarded status in the linked message for @p aMsg. */ void setStatusByLink(const KMMessage *aMsg); - /** Emit progress info - calculates a percent value based on the amount of bytes sent */ - void emitProgressInfo( int currentFileProgress ); - private slots: void slotResult( KJob* job ); + /** This slot should be called when the mail sending progress changes. + It updates the progressbar. */ + void slotProcessedSize( KJob *job, qulonglong size ); + /** abort sending of the current message */ void slotAbortSend(); diff --git a/templateparser.cpp b/templateparser.cpp index 791ef2d7a..719be19d3 100644 --- a/templateparser.cpp +++ b/templateparser.cpp @@ -286,6 +286,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) QString str = pipe( pipe_cmd, mSelection ); QString quote = mOrigMsg->asQuotedString( "", mQuoteString, str, mSmartQuote, mAllowDecryption ); + if ( quote.endsWith( '\n' ) ) + quote.chop( 1 ); body.append( quote ); } @@ -295,6 +297,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) if ( mOrigMsg ) { QString quote = mOrigMsg->asQuotedString( "", mQuoteString, mSelection, mSmartQuote, mAllowDecryption ); + if ( quote.endsWith( '\n' ) ) + quote.chop( 1 ); body.append( quote ); } @@ -305,6 +309,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) QString quote = mOrigMsg->asQuotedString( "", mQuoteString, mOrigMsg->headerAsSendableString(), mSmartQuote, false ); + if ( quote.endsWith( '\n' ) ) + quote.chop( 1 ); body.append( quote ); }