summaryrefslogtreecommitdiff
path: root/noncore/net/mail/mainwindow.cpp
authorharlekin <harlekin>2003-12-14 00:55:16 (UTC)
committer harlekin <harlekin>2003-12-14 00:55:16 (UTC)
commit9a0f1ee9b3ba465942d207eaddec722371f86353 (patch) (side-by-side diff)
tree0dabc3598a8516a58a6b5e01019e22062af2b6de /noncore/net/mail/mainwindow.cpp
parentff2b84787e454f8a11aaef7a4ce18941ac0d28fd (diff)
downloadopie-9a0f1ee9b3ba465942d207eaddec722371f86353.zip
opie-9a0f1ee9b3ba465942d207eaddec722371f86353.tar.gz
opie-9a0f1ee9b3ba465942d207eaddec722371f86353.tar.bz2
little fix
Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp6
1 files changed, 2 insertions, 4 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
@@ -150,47 +150,45 @@ 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)
{
- 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();
readMail.exec();
if ( readMail.deleted ) {
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()
{
}
void MailListViewItem::showEntry()