-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 | |||
@@ -89,20 +89,20 @@ QPopupMenu * POP3viewItem::getContextMenu() | |||
89 | { | 89 | { |
90 | QPopupMenu *m = new QPopupMenu(0); | 90 | QPopupMenu *m = new QPopupMenu(0); |
91 | if (m) | 91 | if (m) |
92 | { | 92 | { |
93 | if (!account->getOffline()) | 93 | if (!account->getOffline()) |
94 | { | 94 | { |
95 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | ||
95 | m->insertItem(QObject::tr("Disconnect",contextName),0); | 96 | m->insertItem(QObject::tr("Disconnect",contextName),0); |
96 | m->insertItem(QObject::tr("Set offline",contextName),1); | 97 | m->insertItem(QObject::tr("Set offline",contextName),1); |
97 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | ||
98 | } | 98 | } |
99 | else | 99 | else |
100 | { | 100 | { |
101 | m->insertItem(QObject::tr("Set online",contextName),1); | ||
102 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | 101 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); |
102 | m->insertItem(QObject::tr("Set online",contextName),1); | ||
103 | } | 103 | } |
104 | } | 104 | } |
105 | return m; | 105 | return m; |
106 | } | 106 | } |
107 | 107 | ||
108 | void POP3viewItem::disconnect() | 108 | void POP3viewItem::disconnect() |
@@ -184,12 +184,13 @@ RECBODYP POP3folderItem::fetchBody(const RecMailP&aMail) | |||
184 | 184 | ||
185 | QPopupMenu * POP3folderItem::getContextMenu() | 185 | QPopupMenu * POP3folderItem::getContextMenu() |
186 | { | 186 | { |
187 | QPopupMenu *m = new QPopupMenu(0); | 187 | QPopupMenu *m = new QPopupMenu(0); |
188 | if (m) | 188 | if (m) |
189 | { | 189 | { |
190 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | ||
190 | m->insertItem(QObject::tr("Refresh header list",contextName),0); | 191 | m->insertItem(QObject::tr("Refresh header list",contextName),0); |
191 | m->insertItem(QObject::tr("Delete all mails",contextName),1); | 192 | m->insertItem(QObject::tr("Delete all mails",contextName),1); |
192 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),2); | 193 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),2); |
193 | } | 194 | } |
194 | return m; | 195 | return m; |
195 | } | 196 | } |
@@ -214,12 +215,15 @@ void POP3folderItem::contextMenuSelected(int which) | |||
214 | case 1: | 215 | case 1: |
215 | deleteAllMail(pop3->getWrapper(),folder); | 216 | deleteAllMail(pop3->getWrapper(),folder); |
216 | break; | 217 | break; |
217 | case 2: | 218 | case 2: |
218 | downloadMails(); | 219 | downloadMails(); |
219 | break; | 220 | break; |
221 | case GET_NEW_MAILS: // daunlood | ||
222 | view->downloadMailsInbox(getFolder() ,pop3->getWrapper()); | ||
223 | break; | ||
220 | default: | 224 | default: |
221 | break; | 225 | break; |
222 | } | 226 | } |
223 | } | 227 | } |
224 | 228 | ||
225 | /** | 229 | /** |
@@ -510,25 +514,24 @@ QPopupMenu * IMAPviewItem::getContextMenu() | |||
510 | { | 514 | { |
511 | QPopupMenu *m = new QPopupMenu(0); | 515 | QPopupMenu *m = new QPopupMenu(0); |
512 | if (m) | 516 | if (m) |
513 | { | 517 | { |
514 | if (!account->getOffline()) | 518 | if (!account->getOffline()) |
515 | { | 519 | { |
520 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | ||
516 | m->insertItem(QObject::tr("Refresh folder list",contextName),0); | 521 | m->insertItem(QObject::tr("Refresh folder list",contextName),0); |
517 | m->insertItem(QObject::tr("Create new folder",contextName),1); | 522 | m->insertItem(QObject::tr("Create new folder",contextName),1); |
518 | m->insertSeparator(); | 523 | m->insertSeparator(); |
519 | m->insertItem(QObject::tr("Disconnect",contextName),2); | 524 | m->insertItem(QObject::tr("Disconnect",contextName),2); |
520 | m->insertItem(QObject::tr("Set offline",contextName),3); | 525 | m->insertItem(QObject::tr("Set offline",contextName),3); |
521 | m->insertSeparator(); | 526 | m->insertSeparator(); |
522 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | ||
523 | } | 527 | } |
524 | else | 528 | else |
525 | { | 529 | { |
526 | m->insertItem(QObject::tr("Set online",contextName),3); | ||
527 | m->insertSeparator(); | ||
528 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | 530 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); |
531 | m->insertItem(QObject::tr("Set online",contextName),3); | ||
529 | } | 532 | } |
530 | } | 533 | } |
531 | return m; | 534 | return m; |
532 | } | 535 | } |
533 | 536 | ||
534 | void IMAPviewItem::createNewFolder() | 537 | void IMAPviewItem::createNewFolder() |
@@ -666,12 +669,13 @@ QPopupMenu * IMAPfolderItem::getContextMenu() | |||
666 | { | 669 | { |
667 | QPopupMenu *m = new QPopupMenu(0); | 670 | QPopupMenu *m = new QPopupMenu(0); |
668 | if (m) | 671 | if (m) |
669 | { | 672 | { |
670 | if (folder->may_select()) | 673 | if (folder->may_select()) |
671 | { | 674 | { |
675 | m->insertItem(QObject::tr("Get new messages",contextName),GET_NEW_MAILS); | ||
672 | m->insertItem(QObject::tr("Refresh header list",contextName),0); | 676 | m->insertItem(QObject::tr("Refresh header list",contextName),0); |
673 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),4); | 677 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),4); |
674 | m->insertItem(QObject::tr("Delete all mails",contextName),1); | 678 | m->insertItem(QObject::tr("Delete all mails",contextName),1); |
675 | } | 679 | } |
676 | if (folder->no_inferior()==false) | 680 | if (folder->no_inferior()==false) |
677 | { | 681 | { |
@@ -750,12 +754,19 @@ void IMAPfolderItem::contextMenuSelected(int id) | |||
750 | case 3: | 754 | case 3: |
751 | deleteFolder(); | 755 | deleteFolder(); |
752 | break; | 756 | break; |
753 | case 4: | 757 | case 4: |
754 | downloadMails(); | 758 | downloadMails(); |
755 | break; | 759 | break; |
760 | case GET_NEW_MAILS: // daunlood | ||
761 | { | ||
762 | AccountView*bl = accountView(); | ||
763 | if (!bl) return; | ||
764 | bl->downloadMailsInbox(getFolder(),imap->getWrapper()); | ||
765 | } | ||
766 | break; | ||
756 | default: | 767 | default: |
757 | break; | 768 | break; |
758 | } | 769 | } |
759 | } | 770 | } |
760 | 771 | ||
761 | /** | 772 | /** |