author | zautrix <zautrix> | 2004-09-16 23:29:24 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-16 23:29:24 (UTC) |
commit | eebe4409884ccd4dedb7cb697a800f74b33eb292 (patch) (unidiff) | |
tree | cd0a235edcab08ee8512c738624dcebac9502749 /kmicromail/opiemail.cpp | |
parent | af411746b1480e7b331ea7d163f39d2507cf7264 (diff) | |
download | kdepimpi-eebe4409884ccd4dedb7cb697a800f74b33eb292.zip kdepimpi-eebe4409884ccd4dedb7cb697a800f74b33eb292.tar.gz kdepimpi-eebe4409884ccd4dedb7cb697a800f74b33eb292.tar.bz2 |
Fixes in ompi
-rw-r--r-- | kmicromail/opiemail.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 3cbac8e..9a1a750 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -220,98 +220,96 @@ void OpieMail::slotEditSettings() | |||
220 | settingsDialog.exec(); | 220 | settingsDialog.exec(); |
221 | } | 221 | } |
222 | 222 | ||
223 | void OpieMail::slotEditAccounts() | 223 | void OpieMail::slotEditAccounts() |
224 | { | 224 | { |
225 | EditAccounts eaDialog( settings, this, 0, true ); | 225 | EditAccounts eaDialog( settings, this, 0, true ); |
226 | eaDialog.slotAdjustColumns(); | 226 | eaDialog.slotAdjustColumns(); |
227 | eaDialog.showMaximized(); | 227 | eaDialog.showMaximized(); |
228 | eaDialog.exec(); | 228 | eaDialog.exec(); |
229 | if ( settings ) delete settings; | 229 | if ( settings ) delete settings; |
230 | settings = new Settings(); | 230 | settings = new Settings(); |
231 | 231 | ||
232 | folderView->populate( settings->getAccounts() ); | 232 | folderView->populate( settings->getAccounts() ); |
233 | } | 233 | } |
234 | 234 | ||
235 | void OpieMail::displayMail() | 235 | void OpieMail::displayMail() |
236 | { | 236 | { |
237 | QListViewItem*item = mailView->currentItem(); | 237 | QListViewItem*item = mailView->currentItem(); |
238 | if (!item) return; | 238 | if (!item) return; |
239 | RecMailP mail = ((MailListViewItem*)item)->data(); | 239 | RecMailP mail = ((MailListViewItem*)item)->data(); |
240 | RecBodyP body = folderView->fetchBody(mail); | 240 | RecBodyP body = folderView->fetchBody(mail); |
241 | ViewMail readMail( this,"", Qt::WType_Modal ); | 241 | ViewMail readMail( this,"", Qt::WType_Modal ); |
242 | readMail.setBody( body ); | 242 | readMail.setBody( body ); |
243 | readMail.setMail( mail ); | 243 | readMail.setMail( mail ); |
244 | readMail.showMaximized(); | 244 | readMail.showMaximized(); |
245 | readMail.exec(); | 245 | readMail.exec(); |
246 | 246 | ||
247 | if ( readMail.deleted ) | 247 | if ( readMail.deleted ) |
248 | { | 248 | { |
249 | folderView->refreshCurrent(); | 249 | folderView->refreshCurrent(); |
250 | } | 250 | } |
251 | else | 251 | else |
252 | { | 252 | { |
253 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); | 253 | ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); |
254 | } | 254 | } |
255 | } | 255 | } |
256 | void OpieMail::slotGetAllMail() | 256 | void OpieMail::slotGetAllMail() |
257 | { | 257 | { |
258 | QListViewItem * item = folderView->firstChild(); | 258 | QListViewItem * item = folderView->firstChild(); |
259 | while ( item ){ | 259 | while ( item ){ |
260 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); | 260 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); |
261 | item = item->nextSibling (); | 261 | item = item->nextSibling (); |
262 | } | 262 | } |
263 | } | 263 | } |
264 | void OpieMail::slotGetMail() | 264 | void OpieMail::slotGetMail() |
265 | { | 265 | { |
266 | QListViewItem * item = folderView->currentItem(); | 266 | QListViewItem * item = folderView->currentItem(); |
267 | if ( ! item ) return; | 267 | if ( ! item ) return; |
268 | while ( item->parent () ) | ||
269 | item = item->parent (); | ||
270 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); | 268 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); |
271 | } | 269 | } |
272 | void OpieMail::slotDeleteMail() | 270 | void OpieMail::slotDeleteMail() |
273 | { | 271 | { |
274 | if (!mailView->currentItem()) return; | 272 | if (!mailView->currentItem()) return; |
275 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); | 273 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); |
276 | if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 274 | if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
277 | { | 275 | { |
278 | mail->Wrapper()->deleteMail( mail ); | 276 | mail->Wrapper()->deleteMail( mail ); |
279 | folderView->refreshCurrent(); | 277 | folderView->refreshCurrent(); |
280 | } | 278 | } |
281 | } | 279 | } |
282 | void OpieMail::slotDeleteAllMail() | 280 | void OpieMail::slotDeleteAllMail() |
283 | { | 281 | { |
284 | 282 | ||
285 | QValueList<RecMailP> t; | 283 | QValueList<RecMailP> t; |
286 | if ( QMessageBox::warning(this, tr("Delete All Mails"), tr("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 284 | if ( QMessageBox::warning(this, tr("Delete All Mails"), tr("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
287 | { | 285 | { |
288 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); | 286 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); |
289 | while ( item ) { | 287 | while ( item ) { |
290 | if ( item->isSelected() ) { | 288 | if ( item->isSelected() ) { |
291 | t.append( item->data() ); | 289 | t.append( item->data() ); |
292 | } | 290 | } |
293 | item = (MailListViewItem*)item->nextSibling(); | 291 | item = (MailListViewItem*)item->nextSibling(); |
294 | } | 292 | } |
295 | } | 293 | } |
296 | else | 294 | else |
297 | return; | 295 | return; |
298 | if ( t.count() == 0 ) | 296 | if ( t.count() == 0 ) |
299 | return; | 297 | return; |
300 | RecMailP mail = t.first(); | 298 | RecMailP mail = t.first(); |
301 | mail->Wrapper()->deleteMailList(t); | 299 | mail->Wrapper()->deleteMailList(t); |
302 | folderView->refreshCurrent(); | 300 | folderView->refreshCurrent(); |
303 | 301 | ||
304 | 302 | ||
305 | } | 303 | } |
306 | void OpieMail::clearSelection() | 304 | void OpieMail::clearSelection() |
307 | { | 305 | { |
308 | mailView->clearSelection(); | 306 | mailView->clearSelection(); |
309 | 307 | ||
310 | } | 308 | } |
311 | 309 | ||
312 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | 310 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) |
313 | { | 311 | { |
314 | if (!mailView->currentItem()) return; | 312 | if (!mailView->currentItem()) return; |
315 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); | 313 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); |
316 | /* just the RIGHT button - or hold on pda */ | 314 | /* just the RIGHT button - or hold on pda */ |
317 | if (button!=2) {return;} | 315 | if (button!=2) {return;} |