author | harlekin <harlekin> | 2003-12-09 18:02:33 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-09 18:02:33 (UTC) |
commit | 0b7d74768f00be986f44bfbd61a6342fc854cc3a (patch) (side-by-side diff) | |
tree | 2e314f0d73e3c720783618870fb6d2e16b4acf3e /noncore/net/mail/viewmail.cpp | |
parent | a30efc4ca72e7689ee35b178d28db82054431fe9 (diff) | |
download | opie-0b7d74768f00be986f44bfbd61a6342fc854cc3a.zip opie-0b7d74768f00be986f44bfbd61a6342fc854cc3a.tar.gz opie-0b7d74768f00be986f44bfbd61a6342fc854cc3a.tar.bz2 |
more updates
Diffstat (limited to 'noncore/net/mail/viewmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index b648b34..cba9948 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp @@ -20,20 +20,21 @@ AttachItem::AttachItem(QListViewItem *parent, AttachItemStore &attachItemStore) { setText(0, _attachItemStore.mimeType()); setText(1, _attachItemStore.fileName()); setText(2, _attachItemStore.description()); } -void ViewMail::setMailInfo( const QString & from, const QString & to, const QString & subject, const QString & cc, const QString & bcc, const QString & bodytext ) { +void ViewMail::setMailInfo( const QString & from, const QStringList & to, const QString & subject, const QStringList & cc, const QStringList & bcc, const QString & date, const QString & bodytext ) { m_mail[0] = from; -m_mail[1] = to; -m_mail[2] = subject; -m_mail[3] = cc; -m_mail[4] = bcc; -m_mail[5] = bodytext; +m_mail2[0] = to; +m_mail[1] = subject; +m_mail2[1] = cc; +m_mail2[2] = bcc; +m_mail[2] = bodytext; +m_mail[3] = date; setText(); } @@ -51,31 +52,45 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) // connect(_handler, SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPUid(IMAPResponse &))); } void ViewMail::setText() { + QString toString; + QString ccString; + QString bccString; + + for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) { + toString += (*it); + } + for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it ) { + ccString += (*it); + } + for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it ) { + bccString += (*it); + } + setCaption( caption().arg( m_mail[0] ) ); _mailHtml = tr( "<html><body>" "<div align=center><b>%1</b></div>" "<b>From:</b> %2<br>" "<b>To:</b> %3<br>" "%4" "%5" "<b>Date:</b> %6<hr>" "<font face=fixed>%7</font>") - .arg( deHtml( m_mail[2] ) ) - .arg( deHtml( m_mail[0] ) ) .arg( deHtml( m_mail[1] ) ) - .arg( tr("<b>Cc:</b> %1<br>").arg( deHtml( m_mail[3] ) ) ) - .arg( tr("<b>Bcc:</b> %1<br>").arg( deHtml( m_mail[4] ) ) ) - .arg( tr("(no date)" ) ) + .arg( deHtml( m_mail[0] ) ) + .arg( deHtml( toString ) ) + .arg( tr("<b>Cc:</b> %1<br>").arg( deHtml( ccString ) ) ) + .arg( tr("<b>Bcc:</b> %1<br>").arg( deHtml( bccString ) ) ) + .arg( m_mail[3] ) .arg("%1"); - browser->setText( QString(_mailHtml) + deHtml( m_mail[5] ) ); + browser->setText( QString(_mailHtml) + deHtml( m_mail[2] ) ); } ViewMail::~ViewMail() { |