summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-10 01:24:21 (UTC)
committer harlekin <harlekin>2003-12-10 01:24:21 (UTC)
commita908d0ffdb5cee72b7823fc411119b8e1e3faad8 (patch) (side-by-side diff)
treea5c25c3d49373c705fd541a28f25436dc206be4f
parentc244afea4a03d7ae948152b5abac2f059fb1e789 (diff)
downloadopie-a908d0ffdb5cee72b7823fc411119b8e1e3faad8.zip
opie-a908d0ffdb5cee72b7823fc411119b8e1e3faad8.tar.gz
opie-a908d0ffdb5cee72b7823fc411119b8e1e3faad8.tar.bz2
basis message id handling
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp2
-rw-r--r--noncore/net/mail/viewmail.cpp4
-rw-r--r--noncore/net/mail/viewmail.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index f19f93d..3edfff1 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -136,49 +136,49 @@ void MainWindow::slotShowFolders( bool show )
qDebug( "-> hiding" );
folderView->hide();
}
}
void MainWindow::refreshMailView(QList<RecMail>*list)
{
MailListViewItem*item = 0;
mailView->clear();
for (unsigned int i = 0; i < list->count();++i) {
item = new MailListViewItem(mailView,item);
item->storeData(*(list->at(i)));
item->showEntry();
}
}
void MainWindow::displayMail(QListViewItem*item)
{
if (!item) return;
qDebug("View mail");
RecMail mail = ((MailListViewItem*)item)->data();
RecBody body = folderView->fetchBody(mail);
ViewMail readMail( this );
- readMail.setMailInfo( mail.getFrom(), mail.To(), mail.getSubject(), mail.CC(), mail.Bcc(), mail.getDate(), body.Bodytext() );
+ readMail.setMailInfo( mail.getFrom(), mail.To(), mail.getSubject(), mail.CC(), mail.Bcc(), mail.getDate(), body.Bodytext(), mail.Msgid() );
readMail.showMaximized();
readMail.exec();
}
MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * after )
:QListViewItem(parent,after),mail_data()
{
}
void MailListViewItem::showEntry()
{
setText(0,mail_data.getSubject());
setText(1,mail_data.getFrom());
setText(2,mail_data.getDate());
}
void MailListViewItem::storeData(const RecMail&data)
{
mail_data = data;
}
const RecMail& MailListViewItem::data()const
{
return mail_data;
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index 8f9ea07..7969235 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -2,60 +2,60 @@
#include <qmessagebox.h>
#include <qaction.h>
#include <qapplication.h>
#include "settings.h"
#include "composemail.h"
#include "viewmail.h"
AttachItem::AttachItem(QListView *parent, AttachItemStore &attachItemStore)
: QListViewItem(parent), _attachItemStore(attachItemStore)
{
setText(0, _attachItemStore.mimeType());
setText(1, _attachItemStore.fileName());
setText(2, _attachItemStore.description());
}
AttachItem::AttachItem(QListViewItem *parent, AttachItemStore &attachItemStore)
: QListViewItem(parent), _attachItemStore(attachItemStore)
{
setText(0, _attachItemStore.mimeType());
setText(1, _attachItemStore.fileName());
setText(2, _attachItemStore.description());
}
-void ViewMail::setMailInfo( const QString & from, const QStringList & to, const QString & subject, const QStringList & cc, const QStringList & bcc, const QString & date, 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, const QString & messageID ) {
m_mail[0] = from;
m_mail2[0] = to;
m_mail[1] = subject;
m_mail2[1] = cc;
m_mail2[2] = bcc;
m_mail[2] = bodytext;
m_mail[3] = date;
+m_mail[4] = messageID;
setText();
-
}
ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
: ViewMailBase(parent, name, fl), _inLoop(false)
{
_gotBody = false;
connect(reply, SIGNAL(activated()), SLOT(slotReply()));
connect(forward, SIGNAL(activated()), SLOT(slotForward()));
attachments->setEnabled(_gotBody);
// _handler->iUid("FETCH", QString("%1 (BODY[1])").arg(mail.uid()));
// connect(_handler, SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPUid(IMAPResponse &)));
}
void ViewMail::setText()
{
QString toString;
QString ccString;
QString bccString;
diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h
index 615939a..258c09b 100644
--- a/noncore/net/mail/viewmail.h
+++ b/noncore/net/mail/viewmail.h
@@ -29,49 +29,49 @@ private:
class AttachItem : public QListViewItem
{
public:
AttachItem(QListView *parent, AttachItemStore &attachment);
AttachItem(QListViewItem *parent, AttachItemStore &attachment);
AttachItemStore attachItemStore() { return _attachItemStore; }
private:
AttachItemStore _attachItemStore;
};
class ViewMail : public ViewMailBase
{
Q_OBJECT
public:
ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal);
~ViewMail();
void hide();
void exec();
static QString appName() { return QString::fromLatin1("mail"); }
- void setMailInfo( const QString & from, const QStringList & to, const QString & subject, const QStringList & cc, const QStringList & bcc,const QString & date, const QString & bodytext );
+ void setMailInfo( const QString & from, const QStringList & to, const QString & subject, const QStringList & cc, const QStringList & bcc,const QString & date, const QString & bodytext, const QString & messageID );
protected:
// void fillList(IMAPResponseBODYSTRUCTURE &structure);
QString deHtml(const QString &string);
protected slots:
void slotReply();
void slotForward();
void setText();
// void slotIMAPUid(IMAPResponse &response);
private:
bool _inLoop;
// IMAPResponseFETCH _mail;
// IMAPHandler *_handler;
QString _mailHtml;
bool _gotBody;
// 0 from
// 1 subject
// 2 bodytext
// 3 date
QMap <int,QString> m_mail;