author | groucho <groucho> | 2003-04-20 07:59:48 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-20 07:59:48 (UTC) |
commit | 8b85cba50912127ff6a2d048021baf68306481c6 (patch) (side-by-side diff) | |
tree | bfd1b377911d05db8e1c816f72fe070d5a5b2ff3 /noncore/net/mailit/readmail.cpp | |
parent | 6b381e438fdeb1757b3278c683349dee9c4ab230 (diff) | |
download | opie-8b85cba50912127ff6a2d048021baf68306481c6.zip opie-8b85cba50912127ff6a2d048021baf68306481c6.tar.gz opie-8b85cba50912127ff6a2d048021baf68306481c6.tar.bz2 |
- Added CC: support
- Added mail forwarding
- Added icon for selective mail download
- Removing mails from mail list via icon
- Temporarily disabled mail header download queue
Diffstat (limited to 'noncore/net/mailit/readmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/readmail.cpp | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/noncore/net/mailit/readmail.cpp b/noncore/net/mailit/readmail.cpp index 7cd3e09..dc98a6f 100644 --- a/noncore/net/mailit/readmail.cpp +++ b/noncore/net/mailit/readmail.cpp @@ -56,13 +56,17 @@ void ReadMail::init() bar = new QToolBar(this); //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,17 +108,22 @@ 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); double mailSize = (double) mail->size; @@ -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); +} + |