summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2004-12-05 14:38:15 (UTC)
committer zautrix <zautrix>2004-12-05 14:38:15 (UTC)
commitea023772f18fa52d2b3d523a68d707576629326f (patch) (side-by-side diff)
tree5c41a05954c543fefb49a27f256f2995a5a67b2a /kmicromail
parent06bebf5be01898145c4f721a8d002519141e7f3b (diff)
downloadkdepimpi-ea023772f18fa52d2b3d523a68d707576629326f.zip
kdepimpi-ea023772f18fa52d2b3d523a68d707576629326f.tar.gz
kdepimpi-ea023772f18fa52d2b3d523a68d707576629326f.tar.bz2
ompi mail view fix
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp16
-rw-r--r--kmicromail/opiemail.h2
-rw-r--r--kmicromail/viewmail.cpp3
-rw-r--r--kmicromail/viewmail.h4
-rw-r--r--kmicromail/viewmailbase.cpp13
-rw-r--r--kmicromail/viewmailbase.h4
6 files changed, 37 insertions, 5 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index c20c7ce..ec192ea 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -301,2 +301,17 @@ void OpieMail::replyMail()
}
+void OpieMail::displayNextMail(ViewMail * vm)
+{
+ QListViewItem*item = mailView->currentItem();
+ if (!item) return;
+ item = item->itemBelow();
+ if (!item) {
+ vm->setCaption(i18n("End of List" ));
+ return;
+ }
+ mailView->setCurrentItem(item);
+ RecMailP mail = ((MailListViewItem*)item)->data();
+ RecBodyP body = folderView->fetchBody(mail);
+ vm->setBody( body );
+ vm->setMail( mail );
+}
void OpieMail::displayMail()
@@ -315,2 +330,3 @@ void OpieMail::displayMail()
#endif
+ connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
readMail.exec();
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 44ab1ec..30968a7 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -9,2 +9,3 @@
#include <libmailwrapper/mailtypes.h>
+#include <viewmail.h>
@@ -27,2 +28,3 @@ public slots:
protected slots:
+ virtual void displayNextMail(ViewMail * vm);
virtual void slotSendQueued();
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 3bd6f41..60c764c 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -327,3 +327,4 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) );
- connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
+ connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
+ connect( nextMail, SIGNAL( activated() ), SLOT( slotNextMail() ) );
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index 194ac8e..c2c2ce3 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -44,3 +44,4 @@ public:
bool deleted;
-
+ signals:
+ void showNextMail(ViewMail*);
protected:
@@ -51,2 +52,3 @@ protected:
protected slots:
+ void slotNextMail() { emit showNextMail(this); };
void slotReply();
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 3d7ed42..c4731a7 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -51,4 +51,15 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
deleteMail->addTo(mailmenu);
- closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
+
+
+
+ nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this);
QLabel *spacer = new QLabel(toolbar);
+ nextMail->addTo(toolbar);
+ nextMail->addTo(mailmenu);
+
+
+
+
+ closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
+ //QLabel *spacer = new QLabel(toolbar);
spacer->setBackgroundMode(QWidget::PaletteButton);
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h
index 1c8948a..c97e9e3 100644
--- a/kmicromail/viewmailbase.h
+++ b/kmicromail/viewmailbase.h
@@ -22,3 +22,3 @@ public:
protected:
- QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail;
+ QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail;
QListView *attachments;
@@ -28,3 +28,3 @@ protected:
QMenuBar *menubar;
- QPopupMenu *mailmenu;
+ QPopupMenu *mailmenu;