summaryrefslogtreecommitdiff
path: root/noncore/net/mail/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 8ef7ddd..c410829 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -62,2 +62,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
62 62
63 deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this);
64 deleteMails->addTo( toolBar );
65 deleteMails->addTo( mailMenu );
66 connect( deleteMails, SIGNAL( activated() ),
67 SLOT( slotDeleteMail() ) );
63 68
@@ -155,2 +160,5 @@ void MainWindow::displayMail(QListViewItem*item)
155{ 160{
161
162 m_currentItem = item;
163
156 if (!item) return; 164 if (!item) return;
@@ -164,4 +172,19 @@ void MainWindow::displayMail(QListViewItem*item)
164 readMail.exec(); 172 readMail.exec();
173
174 if ( readMail.deleted ) {
175 folderView->refreshCurrent();
176 } else {
165 ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") ); 177 ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") );
166} 178}
179}
180
181void MainWindow::slotDeleteMail()
182{
183 if (!m_currentItem) return;
184 RecMail mail = ((MailListViewItem*)m_currentItem)->data();
185 mail.Wrapper()->deleteMail( mail );
186 folderView->refreshCurrent();
187}
188
189
167 190