summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/readmail.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mailit/readmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mailit/readmail.cpp32
1 files changed, 31 insertions, 1 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
@@ -57,12 +57,16 @@ void ReadMail::init()
//reply dependant on viewing inbox
replyButton = new QAction( tr( "Reply" ), Resource::loadPixmap( "mailit/reply" ),
QString::null, 0, this, 0 );
connect(replyButton, SIGNAL(activated()), this, SLOT(reply()) );
+ forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ),
+ QString::null, 0, this, 0 );
+ connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()) );
+
previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
connect( previousButton, SIGNAL( activated() ), this, SLOT( previous() ) );
previousButton->addTo(bar);
previousButton->addTo(viewMenu);
nextButton = new QAction( tr( "Next" ), Resource::loadPixmap( "forward" ), QString::null, 0, this, 0 );
@@ -104,16 +108,21 @@ void ReadMail::updateView()
mail->read = TRUE; //mark as read
inbox = mail->received;
replyButton->removeFrom(mailMenu);
replyButton->removeFrom(bar);
+ forwardButton->removeFrom(mailMenu);
+ forwardButton->removeFrom(bar);
if (inbox == TRUE) {
replyButton->addTo(bar);
replyButton->addTo(mailMenu);
+ forwardButton->addTo(bar);
+ forwardButton->addTo(mailMenu);
+
if (!mail->downloaded) {
//report currently viewed mail so that it will be
//placed first in the queue of new mails to download
emit viewingMail(mail);
@@ -142,12 +151,19 @@ void ReadMail::updateView()
text +="<b>To: </b>";
for (QStringList::Iterator it = mail->recipients.begin();
it != mail->recipients.end(); ++it ) {
text += *it + " ";
}
+
+ text +="<br><b>CC: </b>";
+ for (QStringList::Iterator it = mail->carbonCopies.begin();
+ it != mail->carbonCopies.end(); ++it ) {
+ text += *it + " ";
+ }
+
text += "<br>" + mail->date;
if (mail->files.count() > 0) {
text += "<br><b>Attatchments: </b>";
for ( ePtr=mail->files.first(); ePtr != 0; ePtr=mail->files.next() ) {
@@ -199,12 +215,20 @@ void ReadMail::updateView()
text += "From: " + mail->from + " " + mail->fromMail + "\n";
text += "To: ";
for (QStringList::Iterator it = mail->recipients.begin();
it != mail->recipients.end(); ++it ) {
text += *it + " ";
}
+
+ text += "\nCC: ";
+ for (QStringList::Iterator it = mail->carbonCopies.begin();
+ it != mail->carbonCopies.end(); ++it ) {
+ text += *it + " ";
+ }
+
+
text += "\nDate: " + mail->date + "\n";
if (mail->files.count() > 0) {
text += "Attatchments: ";
for ( ePtr=mail->files.first(); ePtr != 0; ePtr=mail->files.next() ) {
text += ePtr->originalName + " ";
}
@@ -320,8 +344,14 @@ void ReadMail::viewAttatchments()
viewAtt->update(mail, inbox);
viewAtt->showMaximized();
}
void ReadMail::reply()
{
- emit replyRequested(*mail);
+ emit replyRequested(*mail, (bool&)TRUE);
}
+
+void ReadMail::forward()
+{
+ emit forwardRequested(*mail);
+}
+