- Remove the last newline from quotes in templates.

This removes a superflous newline in the default reply template.
- Correct the icon name for the sent mail folder
  This has no effect since that icon is somehow missing though...
- Bring back progress information for sent mails.
  However, since currently no mails bigger than 13kB can be sent due to an kio_smtp bug,
  you will probably not need this.
  Note that it took me some time to find the processedSize() signal, because it is not ine
  the apidox because of some ifdef hack (see commit 641910).
  Would be nice if someone with apidox knowledge can fix that.

svn path=/trunk/KDE/kdepim/; revision=700889
wilder-work
Thomas McGuire 19 years ago
parent 250b9b067c
commit 853c2e2753
  1. 2
      kmfoldertree.cpp
  2. 6
      kmsender.cpp
  3. 7
      kmsender.h
  4. 6
      templateparser.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;

@ -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();
}

@ -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();

@ -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 );
}

Loading…
Cancel
Save