summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
Unidiff
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index d522ad0..3fbdcec 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,2 +1,3 @@
1// CHANGED 2004-09-31 Lutz Rogowski
1// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
2 3
@@ -279,4 +280,5 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
279 m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail())); 280 m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail()));
280 m->insertSeparator(); 281 m->insertSeparator();
282 m->insertItem(tr("Copy/Move all selected mail"),this,SLOT(slotMoveCopyAllMail()));
281 m->insertItem(tr("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); 283 m->insertItem(tr("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
282 m->insertItem(tr("Clear selection"),this,SLOT(clearSelection())); 284 m->insertItem(tr("Clear selection"),this,SLOT(clearSelection()));
@@ -353,4 +355,46 @@ void OpieMail::slotMoveCopyMail()
353} 355}
354 356
357void OpieMail::slotMoveCopyAllMail()
358{
359
360 if (!mailView->currentItem()) return;
361 QValueList<RecMailP> t;
362 if ( QMessageBox::warning(this, tr("Copy/Move all selected mails"), tr("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
363 {
364 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
365 while ( item ) {
366 if ( item->isSelected() ) {
367 t.append( item->data() );
368 }
369 item = (MailListViewItem*)item->nextSibling();
370 }
371 }
372 else
373 return;
374 if ( t.count() == 0 )
375 return;
376 RecMailP mail = t.first();
377 AbstractMail*targetMail = 0;
378 QString targetFolder = "";
379 Selectstore sels;
380 folderView->setupFolderselect(&sels);
381 if (!sels.exec()) return;
382 targetMail = sels.currentMail();
383 targetFolder = sels.currentFolder();
384 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
385 targetFolder.isEmpty())
386 {
387 return;
388 }
389 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
390 {
391 QMessageBox::critical(0,tr("Error creating new Folder"),
392 tr("<center>Error while creating<br>new folder - breaking.</center>"));
393 return;
394 }
395 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
396 folderView->refreshCurrent();
397}
398
355void OpieMail::reEditMail() 399void OpieMail::reEditMail()
356{ 400{