-rw-r--r-- | kmicromail/accountitem.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 1698b40..7b9b881 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp | |||
@@ -92,11 +92,12 @@ QPopupMenu * POP3viewItem::getContextMenu() | |||
92 | { | 92 | { |
93 | m->insertItem(QObject::tr("Disconnect",contextName),0); | 93 | m->insertItem(QObject::tr("Disconnect",contextName),0); |
94 | m->insertItem(QObject::tr("Set offline",contextName),1); | 94 | m->insertItem(QObject::tr("Set offline",contextName),1); |
95 | m->insertItem(QObject::tr("Download messages",contextName),2); | 95 | m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); |
96 | } | 96 | } |
97 | else | 97 | else |
98 | { | 98 | { |
99 | m->insertItem(QObject::tr("Set online",contextName),1); | 99 | m->insertItem(QObject::tr("Set online",contextName),1); |
100 | m->insertItem(QObject::tr("Download new INBOX messages",contextName),2); | ||
100 | } | 101 | } |
101 | } | 102 | } |
102 | return m; | 103 | return m; |
@@ -137,6 +138,8 @@ void POP3viewItem::contextMenuSelected(int which) | |||
137 | setOnOffline(); | 138 | setOnOffline(); |
138 | break; | 139 | break; |
139 | case 2: // daunlood | 140 | case 2: // daunlood |
141 | if (account->getOffline()) | ||
142 | setOnOffline(); | ||
140 | AccountView*bl = accountView(); | 143 | AccountView*bl = accountView(); |
141 | if (!bl) return; | 144 | if (!bl) return; |
142 | AccountViewItem* in = findSubItem( "inbox" , 0); | 145 | AccountViewItem* in = findSubItem( "inbox" , 0); |
@@ -513,10 +516,14 @@ QPopupMenu * IMAPviewItem::getContextMenu() | |||
513 | m->insertSeparator(); | 516 | m->insertSeparator(); |
514 | m->insertItem(QObject::tr("Disconnect",contextName),2); | 517 | m->insertItem(QObject::tr("Disconnect",contextName),2); |
515 | m->insertItem(QObject::tr("Set offline",contextName),3); | 518 | m->insertItem(QObject::tr("Set offline",contextName),3); |
519 | m->insertSeparator(); | ||
520 | m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); | ||
516 | } | 521 | } |
517 | else | 522 | else |
518 | { | 523 | { |
519 | m->insertItem(QObject::tr("Set online",contextName),3); | 524 | m->insertItem(QObject::tr("Set online",contextName),3); |
525 | m->insertSeparator(); | ||
526 | m->insertItem(QObject::tr("Download new INBOX messages",contextName),4); | ||
520 | } | 527 | } |
521 | } | 528 | } |
522 | return m; | 529 | return m; |
@@ -570,6 +577,19 @@ void IMAPviewItem::contextMenuSelected(int id) | |||
570 | SETPIX(PIXMAP_IMAPFOLDER); | 577 | SETPIX(PIXMAP_IMAPFOLDER); |
571 | refreshFolders(false); | 578 | refreshFolders(false); |
572 | break; | 579 | break; |
580 | case 4: // daunlood | ||
581 | { | ||
582 | if (account->getOffline()) { | ||
583 | contextMenuSelected( 3 ); | ||
584 | } | ||
585 | AccountView*bl = accountView(); | ||
586 | if (!bl) return; | ||
587 | AccountViewItem* in = findSubItem( "inbox" , 0); | ||
588 | if ( ! in ) | ||
589 | return; | ||
590 | bl->downloadMailsInbox(in->getFolder(),getWrapper()); | ||
591 | } | ||
592 | break; | ||
573 | default: | 593 | default: |
574 | break; | 594 | break; |
575 | } | 595 | } |