summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/readmail.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mailit/readmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mailit/readmail.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/noncore/unsupported/mailit/readmail.cpp b/noncore/unsupported/mailit/readmail.cpp
index 7cd3e09..dc98a6f 100644
--- a/noncore/unsupported/mailit/readmail.cpp
+++ b/noncore/unsupported/mailit/readmail.cpp
@@ -59,7 +59,11 @@ void ReadMail::init()
59 replyButton = new QAction( tr( "Reply" ), Resource::loadPixmap( "mailit/reply" ), 59 replyButton = new QAction( tr( "Reply" ), Resource::loadPixmap( "mailit/reply" ),
60 QString::null, 0, this, 0 ); 60 QString::null, 0, this, 0 );
61 connect(replyButton, SIGNAL(activated()), this, SLOT(reply()) ); 61 connect(replyButton, SIGNAL(activated()), this, SLOT(reply()) );
62 62
63 forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ),
64 QString::null, 0, this, 0 );
65 connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()) );
66
63 previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 67 previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
64 connect( previousButton, SIGNAL( activated() ), this, SLOT( previous() ) ); 68 connect( previousButton, SIGNAL( activated() ), this, SLOT( previous() ) );
65 previousButton->addTo(bar); 69 previousButton->addTo(bar);
@@ -107,11 +111,16 @@ void ReadMail::updateView()
107 111
108 replyButton->removeFrom(mailMenu); 112 replyButton->removeFrom(mailMenu);
109 replyButton->removeFrom(bar); 113 replyButton->removeFrom(bar);
114 forwardButton->removeFrom(mailMenu);
115 forwardButton->removeFrom(bar);
110 116
111 if (inbox == TRUE) { 117 if (inbox == TRUE) {
112 replyButton->addTo(bar); 118 replyButton->addTo(bar);
113 replyButton->addTo(mailMenu); 119 replyButton->addTo(mailMenu);
114 120 forwardButton->addTo(bar);
121 forwardButton->addTo(mailMenu);
122
123
115 if (!mail->downloaded) { 124 if (!mail->downloaded) {
116 //report currently viewed mail so that it will be 125 //report currently viewed mail so that it will be
117 //placed first in the queue of new mails to download 126 //placed first in the queue of new mails to download
@@ -145,6 +154,13 @@ void ReadMail::updateView()
145 it != mail->recipients.end(); ++it ) { 154 it != mail->recipients.end(); ++it ) {
146 text += *it + " "; 155 text += *it + " ";
147 } 156 }
157
158 text +="<br><b>CC: </b>";
159 for (QStringList::Iterator it = mail->carbonCopies.begin();
160 it != mail->carbonCopies.end(); ++it ) {
161 text += *it + " ";
162 }
163
148 text += "<br>" + mail->date; 164 text += "<br>" + mail->date;
149 165
150 if (mail->files.count() > 0) { 166 if (mail->files.count() > 0) {
@@ -202,6 +218,14 @@ void ReadMail::updateView()
202 it != mail->recipients.end(); ++it ) { 218 it != mail->recipients.end(); ++it ) {
203 text += *it + " "; 219 text += *it + " ";
204 } 220 }
221
222 text += "\nCC: ";
223 for (QStringList::Iterator it = mail->carbonCopies.begin();
224 it != mail->carbonCopies.end(); ++it ) {
225 text += *it + " ";
226 }
227
228
205 text += "\nDate: " + mail->date + "\n"; 229 text += "\nDate: " + mail->date + "\n";
206 if (mail->files.count() > 0) { 230 if (mail->files.count() > 0) {
207 text += "Attatchments: "; 231 text += "Attatchments: ";
@@ -323,5 +347,11 @@ void ReadMail::viewAttatchments()
323 347
324void ReadMail::reply() 348void ReadMail::reply()
325{ 349{
326 emit replyRequested(*mail); 350 emit replyRequested(*mail, (bool&)TRUE);
327} 351}
352
353void ReadMail::forward()
354{
355 emit forwardRequested(*mail);
356}
357