summaryrefslogtreecommitdiff
path: root/noncore/net/mail/accountview.cpp
Side-by-side diff
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 @@
+#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );}
/**
@@ -17,3 +18,10 @@ POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent )
wrapper = AbstractMail::getWrapper( account );
- setPixmap( 0, PIXMAP_POP3FOLDER );
+ SETPIX(PIXMAP_POP3FOLDER);
+#if 0
+ if (!account->getOffline()) {
+ setPixmap( 0, );
+ } else {
+ setPixmap( 0, PIXMAP_OFFLINE );
+ }
+#endif
setText( 0, account->getAccountName() );
@@ -34,2 +42,7 @@ void POP3viewItem::refresh( QList<RecMail> & )
{
+ refresh();
+}
+
+void POP3viewItem::refresh()
+{
if (account->getOffline()) return;
@@ -91,2 +104,4 @@ void POP3viewItem::setOnOffline()
account->save();
+ SETPIX(PIXMAP_POP3FOLDER);
+ refresh();
}
@@ -180,3 +195,3 @@ IMAPviewItem::IMAPviewItem( IMAPaccount *a, AccountView *parent )
wrapper = AbstractMail::getWrapper( account );
- setPixmap( 0, PIXMAP_IMAPFOLDER );
+ SETPIX(PIXMAP_IMAPFOLDER);
setText( 0, account->getAccountName() );
@@ -339,2 +354,3 @@ void IMAPviewItem::contextMenuSelected(int id)
account->save();
+ SETPIX(PIXMAP_IMAPFOLDER);
refreshFolders(false);
@@ -667,3 +683,2 @@ void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper)
{
- unsigned int i = 0;
AbstractMail*targetMail = 0;
@@ -679,14 +694,11 @@ void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper)
}
-
- QList<RecMail> t;
- fromWrapper->listMessages(fromFolder->getName(),t);
- encodedString*st = 0;
- for (i = 0; i < t.count();++i) {
- RecMail*r = t.at(i);
- st = fromWrapper->fetchRawBody(*r);
- if (st) {
- targetMail->storeMessage(st->Content(),st->Length(),targetFolder);
- delete st;
- }
+ 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;
}
+ qDebug("Targetfolder: %s",targetFolder.latin1());
+ qDebug("Fromfolder: %s",fromFolder->getName().latin1());
+ fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails());
+ refreshCurrent();
}