-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 | |||
@@ -23,14 +23,15 @@ AttachItem::AttachItem(QListViewItem *parent, AttachItemStore &attachItemStore) | |||
23 | setText(2, _attachItemStore.description()); | 23 | setText(2, _attachItemStore.description()); |
24 | } | 24 | } |
25 | 25 | ||
26 | void ViewMail::setMailInfo( const QString & from, const QString & to, const QString & subject, const QString & cc, const QString & bcc, const QString & bodytext ) { | 26 | void ViewMail::setMailInfo( const QString & from, const QStringList & to, const QString & subject, const QStringList & cc, const QStringList & bcc, const QString & date, const QString & bodytext ) { |
27 | 27 | ||
28 | m_mail[0] = from; | 28 | m_mail[0] = from; |
29 | m_mail[1] = to; | 29 | m_mail2[0] = to; |
30 | m_mail[2] = subject; | 30 | m_mail[1] = subject; |
31 | m_mail[3] = cc; | 31 | m_mail2[1] = cc; |
32 | m_mail[4] = bcc; | 32 | m_mail2[2] = bcc; |
33 | m_mail[5] = bodytext; | 33 | m_mail[2] = bodytext; |
34 | m_mail[3] = date; | ||
34 | 35 | ||
35 | setText(); | 36 | setText(); |
36 | 37 | ||
@@ -54,6 +55,20 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | |||
54 | void ViewMail::setText() | 55 | void ViewMail::setText() |
55 | { | 56 | { |
56 | 57 | ||
58 | QString toString; | ||
59 | QString ccString; | ||
60 | QString bccString; | ||
61 | |||
62 | for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) { | ||
63 | toString += (*it); | ||
64 | } | ||
65 | for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it ) { | ||
66 | ccString += (*it); | ||
67 | } | ||
68 | for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it ) { | ||
69 | bccString += (*it); | ||
70 | } | ||
71 | |||
57 | setCaption( caption().arg( m_mail[0] ) ); | 72 | setCaption( caption().arg( m_mail[0] ) ); |
58 | 73 | ||
59 | _mailHtml = tr( | 74 | _mailHtml = tr( |
@@ -65,14 +80,14 @@ void ViewMail::setText() | |||
65 | "%5" | 80 | "%5" |
66 | "<b>Date:</b> %6<hr>" | 81 | "<b>Date:</b> %6<hr>" |
67 | "<font face=fixed>%7</font>") | 82 | "<font face=fixed>%7</font>") |
68 | .arg( deHtml( m_mail[2] ) ) | ||
69 | .arg( deHtml( m_mail[0] ) ) | ||
70 | .arg( deHtml( m_mail[1] ) ) | 83 | .arg( deHtml( m_mail[1] ) ) |
71 | .arg( tr("<b>Cc:</b> %1<br>").arg( deHtml( m_mail[3] ) ) ) | 84 | .arg( deHtml( m_mail[0] ) ) |
72 | .arg( tr("<b>Bcc:</b> %1<br>").arg( deHtml( m_mail[4] ) ) ) | 85 | .arg( deHtml( toString ) ) |
73 | .arg( tr("(no date)" ) ) | 86 | .arg( tr("<b>Cc:</b> %1<br>").arg( deHtml( ccString ) ) ) |
87 | .arg( tr("<b>Bcc:</b> %1<br>").arg( deHtml( bccString ) ) ) | ||
88 | .arg( m_mail[3] ) | ||
74 | .arg("%1"); | 89 | .arg("%1"); |
75 | browser->setText( QString(_mailHtml) + deHtml( m_mail[5] ) ); | 90 | browser->setText( QString(_mailHtml) + deHtml( m_mail[2] ) ); |
76 | } | 91 | } |
77 | 92 | ||
78 | 93 | ||