summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
authorzautrix <zautrix>2004-08-31 21:01:18 (UTC)
committer zautrix <zautrix>2004-08-31 21:01:18 (UTC)
commit3f5c51234c8068f3d4826a2a0066648ace21a19f (patch) (side-by-side diff)
tree91b76c1c7ddec6628c573e409070070747d99feb /kmicromail/opiemail.cpp
parent95f8d4f1de557bd25ae38807d970208399cec5d1 (diff)
downloadkdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.zip
kdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.tar.gz
kdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.tar.bz2
Enhancements of kopiemail
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 +1,2 @@
+// CHANGED 2004-09-31 Lutz Rogowski
// CHANGED 2004-08-06 Lutz Rogowski
@@ -280,2 +281,3 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
m->insertSeparator();
+ m->insertItem(tr("Copy/Move all selected mail"),this,SLOT(slotMoveCopyAllMail()));
m->insertItem(tr("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
@@ -354,2 +356,44 @@ void OpieMail::slotMoveCopyMail()
+void OpieMail::slotMoveCopyAllMail()
+{
+
+ if (!mailView->currentItem()) return;
+ QValueList<RecMailP> t;
+ 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 )
+ {
+ MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
+ while ( item ) {
+ if ( item->isSelected() ) {
+ t.append( item->data() );
+ }
+ item = (MailListViewItem*)item->nextSibling();
+ }
+ }
+ else
+ return;
+ if ( t.count() == 0 )
+ return;
+ RecMailP mail = t.first();
+ AbstractMail*targetMail = 0;
+ QString targetFolder = "";
+ Selectstore sels;
+ folderView->setupFolderselect(&sels);
+ if (!sels.exec()) return;
+ targetMail = sels.currentMail();
+ targetFolder = sels.currentFolder();
+ if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
+ targetFolder.isEmpty())
+ {
+ return;
+ }
+ if (sels.newFolder() && !targetMail->createMbox(targetFolder))
+ {
+ QMessageBox::critical(0,tr("Error creating new Folder"),
+ tr("<center>Error while creating<br>new folder - breaking.</center>"));
+ return;
+ }
+ mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
+ folderView->refreshCurrent();
+}
+
void OpieMail::reEditMail()