-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 @@ -92,14 +92,14 @@ QPopupMenu * POP3viewItem::getContextMenu() { 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; @@ -187,6 +187,7 @@ 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); @@ -217,6 +218,9 @@ void POP3folderItem::contextMenuSelected(int which) case 2: downloadMails(); break; + case GET_NEW_MAILS: // daunlood + view->downloadMailsInbox(getFolder() ,pop3->getWrapper()); + break; default: break; } @@ -513,19 +517,18 @@ QPopupMenu * IMAPviewItem::getContextMenu() { 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; @@ -669,6 +672,7 @@ QPopupMenu * IMAPfolderItem::getContextMenu() { 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); @@ -753,6 +757,13 @@ void IMAPfolderItem::contextMenuSelected(int id) case 4: downloadMails(); break; + case GET_NEW_MAILS: // daunlood + { + AccountView*bl = accountView(); + if (!bl) return; + bl->downloadMailsInbox(getFolder(),imap->getWrapper()); + } + break; default: break; } |