summaryrefslogtreecommitdiff
path: root/noncore/net/mail/accountview.cpp
authoralwin <alwin>2004-01-08 02:52:13 (UTC)
committer alwin <alwin>2004-01-08 02:52:13 (UTC)
commit05d47b2603adfab0e16f7395e34b7aa56ce6d8de (patch) (unidiff)
tree4253654acb70b859fd0d32981132dffd35092b9f /noncore/net/mail/accountview.cpp
parentdfa1477a28ecd90e08cf09aeecbe816e94bec0b5 (diff)
downloadopie-05d47b2603adfab0e16f7395e34b7aa56ce6d8de.zip
opie-05d47b2603adfab0e16f7395e34b7aa56ce6d8de.tar.gz
opie-05d47b2603adfab0e16f7395e34b7aa56ce6d8de.tar.bz2
move/copy mails to another folder resides inside wrappers so we can
use special funs of libetpan and/or mailserver itself (eg. imap) libetpan 0.32 requires for that feature a patch! (see libetpanstuff/) accounts marked as "offline" get a new icon TODO: - when creating a new folder while copy/move on imap-server, get the real resulting foldername when using prefix - implement usage of copy/move inside one mbox using special etpan funs
Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountview.cpp40
1 files changed, 26 insertions, 14 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp
index eea021f..b7de7b9 100644
--- a/noncore/net/mail/accountview.cpp
+++ b/noncore/net/mail/accountview.cpp
@@ -9,2 +9,3 @@
9 9
10#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );}
10/** 11/**
@@ -17,3 +18,10 @@ POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent )
17 wrapper = AbstractMail::getWrapper( account ); 18 wrapper = AbstractMail::getWrapper( account );
18 setPixmap( 0, PIXMAP_POP3FOLDER ); 19 SETPIX(PIXMAP_POP3FOLDER);
20#if 0
21 if (!account->getOffline()) {
22 setPixmap( 0, );
23 } else {
24 setPixmap( 0, PIXMAP_OFFLINE );
25 }
26#endif
19 setText( 0, account->getAccountName() ); 27 setText( 0, account->getAccountName() );
@@ -34,2 +42,7 @@ void POP3viewItem::refresh( QList<RecMail> & )
34{ 42{
43 refresh();
44}
45
46void POP3viewItem::refresh()
47{
35 if (account->getOffline()) return; 48 if (account->getOffline()) return;
@@ -91,2 +104,4 @@ void POP3viewItem::setOnOffline()
91 account->save(); 104 account->save();
105 SETPIX(PIXMAP_POP3FOLDER);
106 refresh();
92} 107}
@@ -180,3 +195,3 @@ IMAPviewItem::IMAPviewItem( IMAPaccount *a, AccountView *parent )
180 wrapper = AbstractMail::getWrapper( account ); 195 wrapper = AbstractMail::getWrapper( account );
181 setPixmap( 0, PIXMAP_IMAPFOLDER ); 196 SETPIX(PIXMAP_IMAPFOLDER);
182 setText( 0, account->getAccountName() ); 197 setText( 0, account->getAccountName() );
@@ -339,2 +354,3 @@ void IMAPviewItem::contextMenuSelected(int id)
339 account->save(); 354 account->save();
355 SETPIX(PIXMAP_IMAPFOLDER);
340 refreshFolders(false); 356 refreshFolders(false);
@@ -667,3 +683,2 @@ void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper)
667{ 683{
668 unsigned int i = 0;
669 AbstractMail*targetMail = 0; 684 AbstractMail*targetMail = 0;
@@ -679,14 +694,11 @@ void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper)
679 } 694 }
680 695 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) {
681 QList<RecMail> t; 696 QMessageBox::critical(0,tr("Error creating new Folder"),
682 fromWrapper->listMessages(fromFolder->getName(),t); 697 tr("<center>Error while creating<br>new folder - breaking.</center>"));
683 encodedString*st = 0; 698 return;
684 for (i = 0; i < t.count();++i) {
685 RecMail*r = t.at(i);
686 st = fromWrapper->fetchRawBody(*r);
687 if (st) {
688 targetMail->storeMessage(st->Content(),st->Length(),targetFolder);
689 delete st;
690 }
691 } 699 }
700 qDebug("Targetfolder: %s",targetFolder.latin1());
701 qDebug("Fromfolder: %s",fromFolder->getName().latin1());
702 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails());
703 refreshCurrent();
692} 704}