author | harlekin <harlekin> | 2003-12-14 00:55:16 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-14 00:55:16 (UTC) |
commit | 9a0f1ee9b3ba465942d207eaddec722371f86353 (patch) (unidiff) | |
tree | 0dabc3598a8516a58a6b5e01019e22062af2b6de /noncore/net/mail/mainwindow.cpp | |
parent | ff2b84787e454f8a11aaef7a4ce18941ac0d28fd (diff) | |
download | opie-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.cpp | 6 |
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) | |||
150 | { | 150 | { |
151 | MailListViewItem*item = 0; | 151 | MailListViewItem*item = 0; |
152 | mailView->clear(); | 152 | mailView->clear(); |
153 | for (unsigned int i = 0; i < list->count();++i) { | 153 | for (unsigned int i = 0; i < list->count();++i) { |
154 | item = new MailListViewItem(mailView,item); | 154 | item = new MailListViewItem(mailView,item); |
155 | item->storeData(*(list->at(i))); | 155 | item->storeData(*(list->at(i))); |
156 | item->showEntry(); | 156 | item->showEntry(); |
157 | } | 157 | } |
158 | } | 158 | } |
159 | void MainWindow::displayMail(QListViewItem*item) | 159 | void MainWindow::displayMail(QListViewItem*item) |
160 | { | 160 | { |
161 | 161 | ||
162 | m_currentItem = item; | ||
163 | |||
164 | if (!item) return; | 162 | if (!item) return; |
165 | RecMail mail = ((MailListViewItem*)item)->data(); | 163 | RecMail mail = ((MailListViewItem*)item)->data(); |
166 | RecBody body = folderView->fetchBody(mail); | 164 | RecBody body = folderView->fetchBody(mail); |
167 | 165 | ||
168 | ViewMail readMail( this ); | 166 | ViewMail readMail( this ); |
169 | readMail.setBody( body ); | 167 | readMail.setBody( body ); |
170 | readMail.setMail( mail ); | 168 | readMail.setMail( mail ); |
171 | readMail.showMaximized(); | 169 | readMail.showMaximized(); |
172 | readMail.exec(); | 170 | readMail.exec(); |
173 | 171 | ||
174 | if ( readMail.deleted ) { | 172 | if ( readMail.deleted ) { |
175 | folderView->refreshCurrent(); | 173 | folderView->refreshCurrent(); |
176 | } else { | 174 | } else { |
177 | ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") ); | 175 | ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") ); |
178 | } | 176 | } |
179 | } | 177 | } |
180 | 178 | ||
181 | void MainWindow::slotDeleteMail() | 179 | void MainWindow::slotDeleteMail() |
182 | { | 180 | { |
183 | if (!m_currentItem) return; | 181 | if (!mailView->currentItem()) return; |
184 | RecMail mail = ((MailListViewItem*)m_currentItem)->data(); | 182 | RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); |
185 | mail.Wrapper()->deleteMail( mail ); | 183 | mail.Wrapper()->deleteMail( mail ); |
186 | folderView->refreshCurrent(); | 184 | folderView->refreshCurrent(); |
187 | } | 185 | } |
188 | 186 | ||
189 | 187 | ||
190 | 188 | ||
191 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) | 189 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) |
192 | :QListViewItem(parent,item),mail_data() | 190 | :QListViewItem(parent,item),mail_data() |
193 | { | 191 | { |
194 | } | 192 | } |
195 | 193 | ||
196 | void MailListViewItem::showEntry() | 194 | void MailListViewItem::showEntry() |