Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 77fa706..faa6982 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -4,4 +4,5 @@ #include "defines.h" #include "newmaildir.h" +#include "selectstore.h" #include <qmessagebox.h> #include <qpopupmenu.h> @@ -91,8 +92,16 @@ QPopupMenu * POP3folderItem::getContextMenu() m->insertItem(QObject::tr("Refresh header list",contextName),0); m->insertItem(QObject::tr("Delete all mails",contextName),1); + m->insertItem(QObject::tr("Download all mails",contextName),2); } return m; } +void POP3folderItem::downloadMails() +{ + Selectstore sels; + sels.showMaximized(); + sels.exec(); +} + void POP3folderItem::contextMenuSelected(int which) { @@ -100,4 +109,6 @@ void POP3folderItem::contextMenuSelected(int which) switch (which) { case 0: + /* must be 'cause pop3 lists are cached */ + pop3->getWrapper()->logout(); view->refreshCurrent(); break; @@ -105,4 +116,7 @@ void POP3folderItem::contextMenuSelected(int which) deleteAllMail(pop3->getWrapper(),folder); break; + case 2: + downloadMails(); + break; default: break; @@ -159,9 +173,6 @@ void IMAPviewItem::refresh(QList<RecMail>&) } -void IMAPviewItem::refreshFolders(bool force) +void IMAPviewItem::removeChilds() { - if (childCount()>0 && force==false) return; - QList<Folder> *folders = wrapper->listFolders(); - QListViewItem *child = firstChild(); while ( child ) { @@ -171,4 +182,14 @@ void IMAPviewItem::refreshFolders(bool force) } +} + +void IMAPviewItem::refreshFolders(bool force) +{ + if (childCount()>0 && force==false) return; + + removeChilds(); + + QList<Folder> *folders = wrapper->listFolders(); + Folder *it; QListViewItem*item = 0; @@ -247,4 +268,8 @@ void IMAPviewItem::contextMenuSelected(int id) createNewFolder(); break; + case 2: + removeChilds(); + wrapper->logout(); + break; default: break; |