summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2004-12-13 12:35:00 (UTC)
committer zautrix <zautrix>2004-12-13 12:35:00 (UTC)
commit7ac6c21e832b7d16bd0888d0b66252b6e152005a (patch) (side-by-side diff)
treec7610e0e25020f19af82ac6257c2debab2638316 /kmicromail
parent17b25691f0332e648dd1d800e89ccf4e1da8955d (diff)
downloadkdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.zip
kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.gz
kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.bz2
many bugfixes
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/settings.cpp2
-rw-r--r--kmicromail/opiemail.cpp27
-rw-r--r--kmicromail/opiemail.h2
-rw-r--r--kmicromail/viewmail.cpp5
-rw-r--r--kmicromail/viewmail.h1
5 files changed, 34 insertions, 3 deletions
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 04afe7c..19093b1 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -52,4 +52,4 @@ void Settings::delAccount( Account *account )
{
- accounts.remove( account );
account->remove();
+ accounts.remove( account );
}
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index ec192ea..915b3e8 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -301,2 +301,26 @@ void OpieMail::replyMail()
}
+void OpieMail::closeViewMail(ViewMail * vm)
+{
+ vm->hide();
+}
+void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
+{
+ QListViewItem*item = mailView->currentItem();
+ if (!item ) {
+ closeViewMail(vm);
+ return;
+ }
+ RecMailP mail = ((MailListViewItem*)item)->data();
+ mail->Wrapper()->deleteMail( mail );
+ item = item->itemBelow();
+ if (!item ) {
+ closeViewMail(vm);
+ return;
+ }
+ mailView->setCurrentItem(item);
+ mail = ((MailListViewItem*)item)->data();
+ RecBodyP body = folderView->fetchBody(mail);
+ vm->setBody( body );
+ vm->setMail( mail );
+}
void OpieMail::displayNextMail(ViewMail * vm)
@@ -305,2 +329,3 @@ void OpieMail::displayNextMail(ViewMail * vm)
if (!item) return;
+ ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
item = item->itemBelow();
@@ -331,2 +356,4 @@ void OpieMail::displayMail()
connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
+ connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
+
readMail.exec();
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 30968a7..a81a34c 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -28,2 +28,3 @@ public slots:
protected slots:
+ virtual void deleteAndDisplayNextMail(ViewMail * vm);
virtual void displayNextMail(ViewMail * vm);
@@ -49,2 +50,3 @@ protected slots:
private:
+ void closeViewMail(ViewMail * vm);
QString mPendingEmail;
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 60c764c..6d88cad 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -508,4 +508,5 @@ void ViewMail::slotDeleteMail( )
{
- m_recMail->Wrapper()->deleteMail( m_recMail );
- hide();
+ emit deleteAndDisplayNextMail( this);
+ //m_recMail->Wrapper()->deleteMail( m_recMail );
+ //hide();
deleted = true;
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index c2c2ce3..d85b8b2 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -46,2 +46,3 @@ public:
void showNextMail(ViewMail*);
+ void deleteAndDisplayNextMail(ViewMail *);
protected: