summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp6
-rw-r--r--noncore/net/mail/mainwindow.h1
2 files changed, 2 insertions, 5 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index c410829..2b5870a 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -154,18 +154,16 @@ void MainWindow::refreshMailView(QList<RecMail>*list)
item = new MailListViewItem(mailView,item);
item->storeData(*(list->at(i)));
item->showEntry();
}
}
void MainWindow::displayMail(QListViewItem*item)
{
- m_currentItem = item;
-
if (!item) return;
RecMail mail = ((MailListViewItem*)item)->data();
RecBody body = folderView->fetchBody(mail);
ViewMail readMail( this );
readMail.setBody( body );
readMail.setMail( mail );
readMail.showMaximized();
@@ -175,18 +173,18 @@ void MainWindow::displayMail(QListViewItem*item)
folderView->refreshCurrent();
} else {
( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") );
}
}
void MainWindow::slotDeleteMail()
{
- if (!m_currentItem) return;
- RecMail mail = ((MailListViewItem*)m_currentItem)->data();
+ if (!mailView->currentItem()) return;
+ RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data();
mail.Wrapper()->deleteMail( mail );
folderView->refreshCurrent();
}
MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
:QListViewItem(parent,item),mail_data()
diff --git a/noncore/net/mail/mainwindow.h b/noncore/net/mail/mainwindow.h
index 8641510..21af190 100644
--- a/noncore/net/mail/mainwindow.h
+++ b/noncore/net/mail/mainwindow.h
@@ -32,13 +32,12 @@ protected slots:
protected:
QToolBar *toolBar;
QMenuBar *menuBar;
QPopupMenu *mailMenu, *settingsMenu;
QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
*editSettings, *editAccounts, *syncFolders;
AccountView *folderView;
QListView *mailView;
- QListViewItem* m_currentItem;
QBoxLayout *layout;
};
#endif