author | zautrix <zautrix> | 2004-09-16 20:39:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-16 20:39:34 (UTC) |
commit | b44edfb21be0eee91c4f47401e3fe6ff37e4c16c (patch) (side-by-side diff) | |
tree | a17655e0e679f67498d9fee6f6a532e9c0f0e9e5 /kmicromail/accountitem.cpp | |
parent | b6bfa63deb15a2600d46a8c68c231f068da1444a (diff) | |
download | kdepimpi-b44edfb21be0eee91c4f47401e3fe6ff37e4c16c.zip kdepimpi-b44edfb21be0eee91c4f47401e3fe6ff37e4c16c.tar.gz kdepimpi-b44edfb21be0eee91c4f47401e3fe6ff37e4c16c.tar.bz2 |
better newsgroup handling
-rw-r--r-- | kmicromail/accountitem.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 12d047a..7795055 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp @@ -87,24 +87,24 @@ RECBODYP POP3viewItem::fetchBody( const RecMailP &mail ) QPopupMenu * POP3viewItem::getContextMenu() { QPopupMenu *m = new QPopupMenu(0); if (m) { if (!account->getOffline()) { + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); m->insertItem(QObject::tr("Disconnect",contextName),0); m->insertItem(QObject::tr("Set offline",contextName),1); - m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); } else { - m->insertItem(QObject::tr("Set online",contextName),1); m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); + m->insertItem(QObject::tr("Set online",contextName),1); } } return m; } void POP3viewItem::disconnect() { QListViewItem *child = firstChild(); @@ -182,16 +182,17 @@ RECBODYP POP3folderItem::fetchBody(const RecMailP&aMail) return pop3->getWrapper()->fetchBody(aMail); } QPopupMenu * POP3folderItem::getContextMenu() { QPopupMenu *m = new QPopupMenu(0); if (m) { + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); m->insertItem(QObject::tr("Refresh header list",contextName),0); m->insertItem(QObject::tr("Delete all mails",contextName),1); m->insertItem(QObject::tr("Move/Copie all mails",contextName),2); } return m; } void POP3folderItem::downloadMails() @@ -212,16 +213,19 @@ void POP3folderItem::contextMenuSelected(int which) view->refreshCurrent(); break; case 1: deleteAllMail(pop3->getWrapper(),folder); break; case 2: downloadMails(); break; + case GET_NEW_MAILS: // daunlood + view->downloadMailsInbox(getFolder() ,pop3->getWrapper()); + break; default: break; } } /** * NNTP Account stuff */ @@ -508,29 +512,28 @@ void IMAPviewItem::refreshFolders(bool force) QPopupMenu * IMAPviewItem::getContextMenu() { QPopupMenu *m = new QPopupMenu(0); if (m) { if (!account->getOffline()) { + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); m->insertItem(QObject::tr("Refresh folder list",contextName),0); m->insertItem(QObject::tr("Create new folder",contextName),1); m->insertSeparator(); m->insertItem(QObject::tr("Disconnect",contextName),2); m->insertItem(QObject::tr("Set offline",contextName),3); m->insertSeparator(); - m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); } else { - m->insertItem(QObject::tr("Set online",contextName),3); - m->insertSeparator(); m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); + m->insertItem(QObject::tr("Set online",contextName),3); } } return m; } void IMAPviewItem::createNewFolder() { Newmdirdlg ndirdlg; @@ -664,16 +667,17 @@ RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail) QPopupMenu * IMAPfolderItem::getContextMenu() { QPopupMenu *m = new QPopupMenu(0); if (m) { if (folder->may_select()) { + m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); m->insertItem(QObject::tr("Refresh header list",contextName),0); m->insertItem(QObject::tr("Move/Copie all mails",contextName),4); m->insertItem(QObject::tr("Delete all mails",contextName),1); } if (folder->no_inferior()==false) { m->insertItem(QObject::tr("Create new subfolder",contextName),2); } @@ -748,16 +752,23 @@ void IMAPfolderItem::contextMenuSelected(int id) createNewFolder(); break; case 3: deleteFolder(); break; case 4: downloadMails(); break; + case GET_NEW_MAILS: // daunlood + { + AccountView*bl = accountView(); + if (!bl) return; + bl->downloadMailsInbox(getFolder(),imap->getWrapper()); + } + break; default: break; } } /** * MH Account stuff */ |